/* MoneyBird-inspired Custom Font */
@font-face {
    font-family: 'CustomFont';
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* MoneyBird-inspired additions */
    --topnav-height: 4rem;
    --input-radius: 8px;
    --n0: #ffffff;
    --n200: #e8e8ed;
    --n300: #c7c7cc;
    --n600: #48484a;
    --n700: #2c2c2e;
    --n800: #000000;
    --n800-rgb: 0, 0, 0;
    --r500: #eb0000;
    --b200: #cce6ff;
    --container-background: var(--n0);
    --border: rgba(var(--n800-rgb), .1);
    --border-dark: rgba(var(--n800-rgb), .2);
    --button-secondary-color: var(--n800);
    --button-secondary-background: var(--n0);
    --button-secondary-background-hover: var(--n200);
    --focus-outline-color: var(--b200);
    --app-background: #f8f8fa;
    --primary-text: var(--n700);
    --elevation-overlay: 0 0 20px rgba(var(--n800-rgb), .25);

    /* Light Theme Variables - Copilot Studio Theme */
    --bg-primary: #f8fafc; /* slate-50 */
    --bg-secondary: #ffffff; /* white */
    --bg-tertiary: #f1f5f9; /* slate-100 */
    --bg-nav: rgba(255, 255, 255, 0.7);
    --bg-modal-backdrop: rgba(15, 23, 42, 0.8);
    --bg-code: #1e293b;
    --bg-details-open: #f1f5f9;

    --text-strong: #0f172a; /* slate-900 */
    --text-primary: #334155; /* slate-700 */
    --text-secondary: #64748b; /* slate-500 */
    --text-accent: #7c3aed; /* violet-600 */
    --text-code: #22c55e; /* green-500 */
    --text-on-brand: #ffffff;

    --border-primary: #e2e8f0; /* slate-200 */
    --border-secondary: #cbd5e1; /* slate-300 */
    
    --ring-focus: #7c3aed; /* violet-600 */
    
    --color-brand: #7c3aed; /* violet-600 */
    --color-brand-hover: #5b21b6; /* violet-800 */
    
    --color-xp: #f59e0b; /* amber-500 */
    --color-easy: #22c55e; /* green-500 */
    --color-medium: #f97316; /* orange-500 */
    --color-hard: #ef4444; /* red-500 */
    
    --status-inprogress: #eab308; /* yellow-500 */
    --status-done: #22c55e; /* green-500 */
    
    /* Copilot Studio-specific colors */
    --copilot-purple: #7c3aed;
    --copilot-blue: #3b82f6;
    --copilot-teal: #06b6d4;
    --copilot-green: #10b981;
}

html.dark {
    /* Dark Theme Variables - Copilot Studio Dark Theme */
    --bg-primary: #0f172a; /* slate-900 */
    --bg-secondary: #1e293b; /* slate-800 */
    --bg-tertiary: #334155; /* slate-700 */
    --bg-nav: rgba(30, 41, 59, 0.8);
    --bg-modal-backdrop: rgba(0, 0, 0, 0.9);
    --bg-code: #0f172a;
    --bg-details-open: #334155;

    --text-strong: #f8fafc; /* slate-50 */
    --text-primary: #e2e8f0; /* slate-200 */
    --text-secondary: #94a3b8; /* slate-400 */
    --text-accent: #a78bfa; /* violet-400 */
    --text-code: #4ade80; /* green-400 */
    --text-on-brand: #ffffff;

    --border-primary: #475569; /* slate-600 */
    --border-secondary: #64748b; /* slate-500 */
    
    --ring-focus: #a78bfa; /* violet-400 */
    
    --color-brand: #a78bfa; /* violet-400 */
    --color-brand-hover: #7c3aed; /* violet-600 */
    
    --color-xp: #fbbf24; /* amber-400 */
    --color-easy: #4ade80; /* green-400 */
    --color-medium: #fb923c; /* orange-400 */
    --color-hard: #f87171; /* red-400 */
    
    --status-inprogress: #facc15; /* yellow-400 */
    --status-done: #4ade80; /* green-400 */

    /* Dark mode MoneyBird overrides */
    --container-background: var(--n700);
    --border: rgba(255, 255, 255, .1);
    --border-dark: rgba(255, 255, 255, .2);
    --app-background: var(--bg-primary);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'CustomFont', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-size: .875rem;
}

/* Theme Toggle Switch Styles */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-brand);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Modal transitions */
.modal-transition {
    transition: all 0.3s ease-in-out;
}

.modal-enter-from, .modal-leave-to { 
    opacity: 0; 
    transform: scale(0.95); 
}

.modal-enter-to, .modal-leave-from { 
    opacity: 1; 
    transform: scale(1); 
}

/* Modal content styling */
.modal-content {
    position: relative;
    z-index: 60;
    pointer-events: auto;
}

/* Steps content styling */
.steps-content ol, .steps-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.steps-content ol { 
    list-style-type: decimal; 
}

.steps-content ul { 
    list-style-type: disc; 
    margin-left: 1.5rem; 
}

.steps-content li { 
    margin-bottom: 0.75rem; 
    line-height: 1.6;
}

.steps-content code { 
    background-color: var(--bg-code); 
    color: var(--text-code); 
    padding: 0.25rem 0.5rem; 
    border-radius: 0.375rem; 
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; 
    font-size: 0.875rem; 
}

.steps-content strong { 
    color: var(--text-strong); 
    font-weight: 600;
}

.steps-content h4 { 
    font-size: 1.125rem; 
    font-weight: 600; 
    color: var(--text-strong); 
    margin-top: 1.5rem; 
    margin-bottom: 0.75rem; 
}

.steps-content pre {
    background-color: var(--bg-code);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-primary);
}

.steps-content pre code {
    background: none;
    padding: 0;
    color: var(--text-code);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Progress ring styling */
.progress-ring__background {
    fill: none;
    stroke: var(--border-secondary);
    stroke-width: 4;
}

.progress-ring__circle {
    fill: none;
    stroke: var(--color-xp);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 100.53;
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.progress-ring__text {
    fill: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: central;
}

/* Toast notifications */
#toast-container { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    z-index: 100; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.toast { 
    background-color: var(--bg-secondary); 
    color: var(--text-strong); 
    padding: 12px 20px; 
    border-radius: 8px; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    border-left: 4px solid var(--color-brand); 
    opacity: 0; 
    transform: translateX(100%); 
    animation: slideIn 0.5s forwards, fadeOut 0.5s 2.5s forwards; 
}

@keyframes slideIn { 
    to { 
        opacity: 1; 
        transform: translateX(0); 
    } 
}

@keyframes fadeOut { 
    to { 
        opacity: 0; 
        transform: translateX(100%); 
    } 
}

/* MoneyBird-inspired Button Styles */
.btn {
    -webkit-user-select: none;
    user-select: none;
}

.btn--secondary {
    color: var(--button-secondary-color);
    background-color: var(--button-secondary-background);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background-color: var(--button-secondary-background-hover);
}

.btn--icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--input-radius);
    transition: background-color .2s ease, box-shadow .2s ease;
    box-shadow: 0 0 0 0 transparent;
    cursor: pointer;
}

.btn--icon-only:hover {
    box-shadow: var(--elevation-overlay);
}

.btn--icon-only:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-outline-color);
}

.btn__icon {
    font-size: 1rem;
    color: var(--n600);
    display: inline-block;
}

/* MoneyBird-inspired Notification Badge */
.topnav__notification {
    position: relative;
}

.topnav__notification-dot {
    display: flex;
    font-size: 0;
    position: absolute;
    right: .5rem;
    top: .5rem;
    border-radius: 50%;
    width: .5rem;
    height: .5rem;
    background-color: var(--r500);
    border: 2px solid var(--button-secondary-background);
    z-index: 10;
    pointer-events: none;
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .8;
        transform: scale(1.1);
    }
}

/* User Dropdown Styling */
.user-dropdown {
    color: var(--n800);
    border: 1px solid var(--border);
    transition: background-color .2s ease, border-color .2s ease;
}

.user-dropdown .text-sm {
    font-weight: 500;
}

.user-dropdown:hover {
    border-color: var(--border-dark);
}

.user-dropdown i {
    color: var(--n800);
}

/* Copilot Studio-specific styling */
.copilot-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(45deg, var(--copilot-purple), var(--copilot-blue));
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.difficulty-badge.easy {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--color-easy);
}

.difficulty-badge.medium {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--color-medium);
}

.difficulty-badge.hard {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-hard);
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* Theory badge */
.status-badge.theory {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: 1px solid #1d4ed8;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* Category styling */
.category-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

/* Filter buttons */
.filter-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
    cursor: pointer;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
}

.filter-btn:hover {
    color: var(--text-strong);
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: var(--color-brand);
    color: var(--text-on-brand);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    border-color: var(--color-brand);
}

/* Learning objectives */
.learning-objectives-block {
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 0.75rem;
    border-left: 4px solid var(--color-brand);
}

html.dark .learning-objectives-block {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.1));
    border-color: rgba(124, 58, 237, 0.3);
}

.learning-objectives-title {
    font-weight: 600;
    color: var(--color-brand);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learning-objectives-list {
    list-style-type: disc;
    list-style-position: inside;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.learning-objectives-list li {
    margin-bottom: 0.25rem;
}

/* Objective checkboxes */
.objective-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: var(--bg-primary);
    cursor: pointer;
}

.objective-checkbox:hover {
    border-color: var(--color-brand);
    background-color: var(--bg-tertiary);
}

.objective-checkbox.checked {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
}

.objective-item {
    user-select: none;
}

.objective-item:active {
    transform: scale(0.98);
}

/* Exercise card enhancements */
.exercise-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
}

.exercise-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--color-brand);
}

.exercise-card.completed {
    border-color: var(--status-done);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(22, 163, 74, 0.05));
}

/* Code syntax highlighting improvements */
.steps-content .language-copilot {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-left: 4px solid var(--copilot-purple);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .steps-content pre {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Animation enhancements */
@keyframes copilotGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(124, 58, 237, 0.5); 
    }
    50% { 
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.8); 
    }
}

.copilot-highlight {
    animation: copilotGlow 2s ease-in-out infinite;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.status-indicator.completed {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--status-done);
}

.status-indicator.in-progress {
    background-color: rgba(234, 179, 8, 0.1);
    color: var(--status-inprogress);
}

.status-indicator.not-started {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Time estimate styling */
.exercise-card .text-xs:has(.text-secondary) {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.exercise-card:hover .text-xs:has(.text-secondary) {
    opacity: 1;
}

/* ===== NEW FEATURES STYLING ===== */

/* 1. Favorite/Bookmark Button */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    padding: 0.25rem;
    filter: grayscale(1);
}

.favorite-btn:hover {
    transform: scale(1.2);
    filter: grayscale(0);
}

.favorite-btn.favorited {
    filter: grayscale(0);
    animation: heartbeat 0.5s ease;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
}

/* 2. Code Copy Button Enhancements */
.code-toolbar {
    position: relative;
}

.code-toolbar .toolbar {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.code-toolbar:hover .toolbar {
    opacity: 1;
}

.code-toolbar .toolbar button {
    background: var(--color-brand) !important;
    color: white !important;
    border: none !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.375rem !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.code-toolbar .toolbar button:hover {
    background: var(--color-brand-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Prism syntax highlighting overrides */
pre[class*="language-"] {
    background: var(--bg-code) !important;
    border-radius: 0.5rem;
    padding: 1rem !important;
    margin: 1rem 0;
    border: 1px solid var(--border-primary);
    position: relative;
}

code[class*="language-"] {
    color: var(--text-code);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* 3. Streak Counter Styling */
.streak-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--copilot-purple), var(--copilot-blue));
    border-radius: 9999px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(124, 58, 237, 0.3);
    animation: streakGlow 2s ease-in-out infinite;
}

.streak-counter .streak-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.streak-counter .streak-flame {
    font-size: 1.5rem;
    animation: flicker 1.5s ease-in-out infinite;
}

@keyframes streakGlow {
    0%, 100% { 
        box-shadow: 0 4px 6px rgba(124, 58, 237, 0.3); 
    }
    50% { 
        box-shadow: 0 6px 12px rgba(124, 58, 237, 0.5); 
    }
}

@keyframes flicker {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(5deg); }
    75% { transform: scale(1.05) rotate(-3deg); }
}

/* 4. Progress Resume Indicator */
.resume-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    color: var(--copilot-purple);
    border-radius: 9999px;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.resume-progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.resume-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-brand), var(--copilot-blue));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* 5. Notes Section Styling */
.notes-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    border: 2px dashed var(--border-secondary);
}

.notes-section:focus-within {
    border-color: var(--color-brand);
    background: var(--bg-secondary);
}

.notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.notes-saved-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--status-done);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notes-saved-indicator.show {
    opacity: 1;
}

/* Notes preview on cards */
.note-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(124, 58, 237, 0.05);
    border-left: 3px solid var(--color-brand);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Favorites filter badge */
.favorites-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(238, 90, 111, 0.3);
}

/* Enhanced modal for notes */
.notes-modal-section {
    background: var(--bg-tertiary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.notes-header h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
}

/* Copy button success state */
.copy-success {
    background: var(--status-done) !important;
}

.copy-success::after {
    content: "✓ Copied!";
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .streak-counter {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .notes-section {
        padding: 0.75rem;
    }
    
    .favorite-btn {
        font-size: 1rem;
    }
}

/* ===== COMPLETION CELEBRATION ANIMATIONS ===== */

/* Celebration Modal */
.celebration-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.celebration-content {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--color-brand);
    position: relative;
    animation: celebrationPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes celebrationPop {
    0% {
        transform: scale(0.3) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.celebration-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
    display: inline-block;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-30px) scale(1.1);
    }
    60% {
        transform: translateY(-15px) scale(1.05);
    }
}

.celebration-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-brand), var(--copilot-blue), var(--copilot-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.celebration-message {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.celebration-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    gap: 1rem;
}

.celebration-stat {
    flex: 1;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-primary);
}

.celebration-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-brand);
    display: block;
}

.celebration-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.celebration-xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 9999px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #78350f;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
    animation: xpPulse 2s ease-in-out infinite;
}

@keyframes xpPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 12px rgba(245, 158, 11, 0.5);
    }
}

.celebration-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.celebration-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.celebration-btn-primary {
    background: var(--color-brand);
    color: white;
}

.celebration-btn-primary:hover {
    background: var(--color-brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(124, 58, 237, 0.3);
}

.celebration-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.celebration-btn-secondary:hover {
    background: var(--border-secondary);
    transform: translateY(-2px);
}

.celebration-btn-share {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.celebration-btn-share:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

/* AI Agent/Bot specific styling */
.ai-agent-icon {
    background: linear-gradient(135deg, var(--copilot-purple), var(--copilot-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.3));
}

/* Conversational AI styling */
.conversation-flow {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(59, 130, 246, 0.05));
    border-left: 4px solid var(--copilot-purple);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Power Platform integration styling */
.power-platform-badge {
    background: linear-gradient(135deg, var(--copilot-purple), var(--copilot-teal));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Bot testing panel styling */
.test-bot-panel {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.test-bot-panel:hover {
    border-color: var(--color-brand);
    background: var(--bg-secondary);
}

/* Analytics dashboard styling */
.analytics-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(6, 182, 212, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 0.5rem 0;
}

/* Level Badge for Copilot Studio */
.level-badge {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--copilot-blue) 100%);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 70px;
}

.level-badge .text-xs {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.level-badge .text-2xl {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Video Content Section for Copilot Studio */
.video-content-section {
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.05) 0%, 
        rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.video-content-section:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
    transform: translateY(-1px);
}

html.dark .video-content-section {
    background: linear-gradient(135deg, 
        rgba(124, 58, 237, 0.1) 0%, 
        rgba(59, 130, 246, 0.1) 100%);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

html.dark .video-content-section:hover {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.video-content-section h4 {
    color: var(--copilot-purple);
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

html.dark .video-content-section h4 {
    color: var(--text-accent);
}

/* User Profile Section Styles */
.user-profile-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.user-profile-section:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.user-profile-section img {
    transition: all 0.2s ease;
    background: linear-gradient(135deg, var(--copilot-purple), var(--copilot-blue));
}

.user-profile-section:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Last login text styling with Copilot colors */
.user-info .text-xs:last-child {
    font-weight: 500;
    background: linear-gradient(90deg, var(--text-accent), var(--color-brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
    .user-profile-section {
        padding: 0.5rem 0.75rem;
    }
    
    .user-profile-section img {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 768px) {
    .user-profile-section {
        display: flex;
        padding: 0.375rem 0.5rem;
        margin-right: 0.5rem;
    }
    
    .user-info div:nth-child(2),
    .user-info div:nth-child(3) {
        display: none;
    }
}