/* --- PALETA VIBRANTE GENII (REBRANDING) --- */
    :root {
        /* Cores Principais Genii */
        --primary: #00cfc1;
        --primary-dark: #00a398;

        --secondary: #1cb0f6;
        --secondary-dark: #0c8bc4;

        --accent: #ffce00;
        --accent-dark: #ccb000;

        --purple: #a270f4;
        --purple-dark: #824dd6;

        --coral: #ff6b6b;
        --coral-dark: #d44343;
        --success: #38b2ac;
        --danger: #ff6b6b;

        --dark: #3a3a3a;
        --grey: #6e7b82;
        --bg-light: #f7f9fa;
        --bg-off: #ffffff;
        --surface: #ffffff;

        --border: #e8edf1;
        --border-dark: #c5d2db;
        --dot-color: #BDD4E7;

        --nav-bg: rgba(255, 255, 255, 0.95);
        --badge-purple-bg: #f3e8ff;
        --badge-purple-border: #e7d5ff;
        --badge-teal-bg: #e6faf8;
        --badge-teal-border: #ccf0ed;
        --badge-coral-bg: #FFF5F5;
        --badge-coral-hover: #FFE3E3;
        --badge-coral-border: #FFCCD5;

        --radius-card: 24px;
        --radius-btn: 16px;

        --input-bg: #F9FAFB;
        --input-border: #E5E7EB;
        --hover-light: #E0F7FA;
        --hover-light-purple: #F0EBFF;
        --accent-light-bg: #EAF4FF;
        --accent-light-shadow: #b2d8f0;
        --icon-btn-bg: #F5F7FA;
        --icon-btn-shadow: #e0e3e6;
        --card-actions-border: #F5F7FA;
        --image-placeholder: #f0f0f0;
        --stat-yellow-bg: #FFF4E5;
        --stat-red-bg: #FFE5E9;
        --stat-green-bg: #E0F7EF;
        --stat-purple-bg: #F0EBFF;
        --segmented-bg: #F0F4F8;
        --sub-tab-bg: #F8F9FA;
        --dropdown-bg: #ffffff;
        --dropdown-hover-bg: #F0F2F5;
        --modal-bg: #ffffff;
        --pin-card-bg: #ffffff;
        --pin-input-bg: #FAFAFA;
        --pin-input-border: #B2EBF2;
        --action-chip-bg: #ffffff;
        --action-chip-shadow: #E5E5E5;
        --option-item-bg: #F8F9FA;
        --option-face-bg: #E0E4E8;
        --showcase-img-bg: #EDE7F6;
        --showcase-play-bg: #F0EBFF;
        --showcase-play-shadow: #D6D0F0;
        --fav-counter-bg: #FFF9E6;
        --sets-counter-bg: #ffffff;
        --mission-item-bg: #F8F9FA;
        --mission-check-border: #A0AEC0;
        --date-badge-bg: #ffffff;
        --btn-outline-border: #E5E5E5;
        --btn-ghost-border: #E0E7FF;
        --class-card-border: #E5E7EB;
        --class-footer-bg: #ffffff;
        --class-footer-text: #5F6368;
        --card-menu-color: #999;
        --card-menu-hover-bg: #F0F2F5;
        --card-dropdown-border: #E5E7EB;
        --genii-input-bg: #F9FAFB;
        --drag-handle-color: #ccc;
        --loading-text: #636e72;

        --text-muted: #444444;
        --text-light: #555555;
        --text-faint: #999999;
        --text-ghost: #cccccc;
        --text-aaa: #aaaaaa;
        --bg-elevated: #eeeeee;
        --cancel-shadow: #d4d4d4;
        --menu-hover: #f3f0ff;
        --danger-hover: #fff5f5;
        --select-hover: #f3f0ff;
        --border-light: #f0f0f0;
        --settings-divider: #f0f4f8;
        --code-display-border: #cccccc;
        --status-todo-bg: #fff3e0;
        --status-done-bg: #e8f5e9;
        --status-late-bg: #ffebee;
        --delete-class-bg: #fff5f5;
        --delete-class-border: #ffe0e0;
        --kick-hover-bg: #fff5f5;
        --stat-card-default-border: #cccccc;
        --filter-pill-hover: #cccccc;
        --calendar-nav-hover: #e5e7eb;
        --assignment-view-hover: #e5e7eb;
        --post-input-color: #444444;
        --comment-text-color: #444444;

        --footer-bg: #00cec0;
        --footer-highlight: #00edd9;
        --footer-text: rgba(255, 255, 255, 0.8);
        --footer-text-muted: #ffffff;

        /* Alias legados para manter compatibilidade */
        --genii-teal: var(--primary);
        --genii-dark: var(--dark);
        --genii-purple: var(--purple);
        --light-blue-bg: var(--bg-light);
        
        --shadow-card: none;
        --font-heading: 'Fredoka', sans-serif;
        --font-body: 'Nunito', sans-serif;
    }

    /* --- GLOBAL DARK MODE OVERRIDES --- */
    [data-theme="dark"] {
        --bg-light: #121212;
        --bg-off: #1a1a1a;
        --surface: #222222;
        --dark: #ffffff;
        --grey: #b0b0b0;
        --border: #444444;
        --border-dark: #0a0a0a;
        --dot-color: #2a2e3a;

        --nav-bg: rgba(18, 18, 18, 0.85);

        --badge-purple-bg: #2a2a2a;
        --badge-purple-border: #444444;
        --badge-teal-bg: #2a2a2a;
        --badge-teal-border: #444444;
        --badge-coral-bg: #2a1a1a;
        --badge-coral-hover: #3a2020;
        --badge-coral-border: #5a3030;

        --footer-bg: #00a398;
        --footer-highlight: #00cfc1;
        --footer-text: #dadada;
        --footer-text-muted: #ffffff;

        --shadow-card: none;

        --input-bg: #2a2a2a;
        --input-border: #444444;
        --hover-light: #1a3a3a;
        --hover-light-purple: #2a1a3a;
        --accent-light-bg: #1a2a3a;
        --accent-light-shadow: #0a1a2a;
        --icon-btn-bg: #2a2a2a;
        --icon-btn-shadow: #1a1a1a;
        --card-actions-border: #333333;
        --image-placeholder: #2a2a2a;
        --stat-yellow-bg: rgba(255, 206, 0, 0.18);
        --stat-red-bg: rgba(255, 107, 107, 0.18);
        --stat-green-bg: rgba(0, 210, 186, 0.18);
        --stat-purple-bg: rgba(28, 176, 246, 0.18);
        --segmented-bg: #2a2a2a;
        --sub-tab-bg: #2a2a2a;
        --dropdown-bg: #222222;
        --dropdown-hover-bg: #2a2a2a;
        --modal-bg: #222222;
        --pin-card-bg: #222222;
        --pin-input-bg: #2a2a2a;
        --pin-input-border: #444444;
        --action-chip-bg: #222222;
        --action-chip-shadow: #1a1a1a;
        --option-item-bg: #2a2a2a;
        --option-face-bg: #3a3a3a;
        --showcase-img-bg: #2a2a2a;
        --showcase-play-bg: #2a1a3a;
        --showcase-play-shadow: #1a1020;
        --fav-counter-bg: #3a3a1a;
        --sets-counter-bg: #222222;
        --mission-item-bg: #2a2a2a;
        --mission-check-border: #555555;
        --date-badge-bg: #222222;
        --btn-outline-border: #444444;
        --btn-ghost-border: #444444;
        --class-card-border: #444444;
        --class-footer-bg: #1a1a1a;
        --class-footer-text: #b0b0b0;
        --card-menu-color: #b0b0b0;
        --card-menu-hover-bg: #2a2a2a;
        --card-dropdown-border: #444444;
        --genii-input-bg: #2a2a2a;
        --drag-handle-color: #555555;
        --loading-text: #b0b0b0;

        --text-muted: #cccccc;
        --text-light: #aaaaaa;
        --text-faint: #777777;
        --text-ghost: #555555;
        --text-aaa: #666666;
        --bg-elevated: #333333;
        --cancel-shadow: #222222;
        --menu-hover: #2a1a3a;
        --danger-hover: #3a1a1a;
        --select-hover: #2a1a3a;
        --border-light: #333333;
        --settings-divider: #333333;
        --code-display-border: #555555;
        --status-todo-bg: #3a2a0a;
        --status-done-bg: #0a3a1a;
        --status-late-bg: #3a0a0a;
        --delete-class-bg: #3a1a1a;
        --delete-class-border: #5a3030;
        --kick-hover-bg: #3a1a1a;
        --stat-card-default-border: #444444;
        --filter-pill-hover: #555555;
        --calendar-nav-hover: #333333;
        --assignment-view-hover: #333333;
        --post-input-color: #cccccc;
        --comment-text-color: #cccccc;
    }

    [data-theme="dark"] *::-webkit-scrollbar { width: 8px; height: 8px; }
    [data-theme="dark"] *::-webkit-scrollbar-track { background: var(--surface); border-radius: 4px; }
    [data-theme="dark"] *::-webkit-scrollbar-thumb { background: #555555; border-radius: 4px; }
    [data-theme="dark"] *::-webkit-scrollbar-thumb:hover { background: #777777; }
    [data-theme="dark"] * { scrollbar-width: thin; scrollbar-color: #555555 var(--surface); }

    /* === TIPOGRAFIA GLOBAL === */
    h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
    button, .btn, input[type="submit"] { font-family: var(--font-heading); }

    /* === GENII 3D BUTTON SYSTEM === */
    .btn {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        padding: 14px 28px; border-radius: 16px;
        font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1rem;
        cursor: pointer; transition: transform 0.1s;
        letter-spacing: 0.5px; text-transform: uppercase;
        border: none; text-decoration: none;
        position: relative; top: 0;
    }
    .btn:hover { filter: brightness(1.08); }
    .btn:active { transform: translateY(5px) !important; box-shadow: none !important; top: 0; }

    .btn-primary {
        background: var(--primary); color: white;
        box-shadow: 0 5px 0 var(--primary-dark);
    }
    .btn-secondary {
        background: var(--secondary); color: white;
        box-shadow: 0 5px 0 #5a4bd4;
    }
    .btn-danger {
        background: var(--danger); color: white;
        box-shadow: 0 5px 0 #d94e66;
    }
    .btn-accent {
        background: var(--accent); color: var(--dark);
        box-shadow: 0 5px 0 #d4a800;
    }
    .btn-success {
        background: var(--success); color: white;
        box-shadow: 0 5px 0 #0a9a70;
    }
    .btn-outline {
        background: var(--surface); color: var(--secondary);
        border: 2px solid var(--btn-outline-border);
        box-shadow: 0 5px 0 var(--btn-outline-border);
    }
    .btn-outline:hover { background: var(--bg-off); border-color: var(--border); }
    .btn-ghost {
        background: var(--surface); color: var(--primary);
        border: 2px solid var(--btn-ghost-border);
        box-shadow: 0 5px 0 var(--btn-ghost-border);
    }
    .btn-ghost:hover { border-color: var(--primary); background: var(--hover-light); }

    .btn-sm { padding: 8px 20px; font-size: 0.9rem; }
    .btn-lg { padding: 18px 36px; font-size: 1.2rem; }
    .btn-block { width: 100%; }

    /* --- RESET E BASE --- */
    * { box-sizing: border-box; }
    body { 
        margin: 0; font-family: var(--font-body); 
        background-color: var(--light-blue-bg); 
        /* Padrão de pontos subtil */
        background-image: radial-gradient(var(--dot-color) 1.5px, transparent 1.5px);
        background-size: 24px 24px;
        color: var(--dark);
    }

    body.loaded {
    opacity: 1;
    }

    /* --- SIDEBAR --- */
    .sidebar {
        width: 260px; background: var(--surface); 
        border-right: 2px solid var(--border);
        display: flex; flex-direction: column; 
        padding: 24px; position: fixed; height: 100vh; z-index: 100;
    }

    .logo-area { margin-bottom: 40px; padding-left: 10px; }
    .logo-area img { height: 95px; }

    .nav-menu { list-style: none; padding: 0; flex: 1; }
    .nav-item { margin-bottom: 10px; }
    
    .nav-link {
        display: flex; align-items: center; gap: 14px;
        padding: 14px 18px; border-radius: 16px;
        color: var(--grey); font-weight: 700; text-decoration: none;
        transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        border: 2px solid transparent;
    }
    .nav-link:hover { 
        background: var(--hover-light); color: var(--primary); 
        transform: translateX(4px);
    }
    .nav-link.active { 
        background: var(--primary); 
        color: white; 
    }
    .nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }

    .user-mini {
        margin-top: auto; padding: 16px; 
        background: var(--badge-coral-bg); border-radius: 12px;
        display: flex; align-items: center; justify-content: center; gap: 10px; 
        cursor: pointer; transition: 0.2s; border: 1px solid var(--badge-coral-border);
    }
    .user-mini:hover { background: var(--badge-coral-hover); }

    /* --- MAIN CONTENT --- */
    .main-content {
        flex: 1; margin-left: 260px; padding: 0;
        padding-top: 90px; /* Reserva espaço para o user-widget fixo no topo */
        position: relative;
        animation: slideIn 0.4s ease-out;
        background: transparent;
        min-height: 100vh;
    }
    /* Páginas com banner full-width no topo não precisam do padding extra */
    .main-content.has-banner { padding-top: 0; }

    @keyframes slideIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Banner "Hero" */
    .profile-banner {
        height: 240px;
        background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
        position: relative;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
        overflow: hidden;
    }
    /* Formas decorativas no banner */
    .banner-decoration {
        position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1);
    }
    .bd-1 { width: 150px; height: 150px; top: -20px; left: 10%; }
    .bd-2 { width: 300px; height: 300px; bottom: -100px; right: 5%; }

    .container {
        max-width: 1100px; margin: -100px auto 40px; padding: 0 30px; 
        position: relative; z-index: 2;
    }

    /* --- GRID Layout --- */
    /* --- GRID Layout --- */
    .profile-grid {
        display: grid; 
        grid-template-columns: 340px minmax(0, 1fr); 
        gap: 30px;
        align-items: stretch; /* Garante que a coluna da esquerda desce até ao fundo */
    }

    /* Coluna esquerda: ocupa toda a altura da grid row */
    .profile-left {
        min-width: 0;
        height: 100%; /* Ocupa a altura toda da coluna direita */
    }

    /* Wrapper sticky dentro da coluna esquerda */
    .profile-left-sticky {
        top: 100px; /* Distância do topo do ecrã */
        display: flex; 
        flex-direction: column; 
        gap: 20px;
    }

    /* Coluna direita: impedir overflow */
    .content-area {
        min-width: 0;
    }

    /* CARD PERFIL (ESQUERDA) */
    .profile-card {
        background: var(--surface); border-radius: 28px;
        padding: 35px 25px; text-align: center;
         
        border: 3px solid var(--surface);
    }

    .profile-pic-wrapper {
        width: 170px; height: 170px; margin: 0 auto 20px;
        position: relative; 
        /* MUDANÇA: Quadrado arredondado estilo Blooket */
        border-radius: 24px; 
        background: var(--accent-light-bg); border: 6px solid var(--surface);
        overflow: hidden; cursor: pointer; transition: transform 0.2s;
    }
    .profile-pic-wrapper:hover { transform: scale(1.03); }
    .profile-pic-wrapper:hover .edit-overlay { opacity: 1; }

    .avatar-layer {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        object-fit: cover; object-position: top center;
    }
    .uploaded-photo { width: 100%; height: 100%; object-fit: cover; }
    .edit-overlay {
        position: absolute; inset: 0; background: rgba(0, 210, 186, 0.7);
        display: flex; align-items: center; justify-content: center;
        color: white; opacity: 0; transition: 0.2s; font-size: 1.8rem;
        z-index: 100; 
    }

    /* photo-preview-circle - mantido por retrocompatibilidade */
    .photo-preview-circle {
        width: 120px; height: 120px; border-radius: 24px;
        background: #eee; object-fit: cover; border: 2px solid #ddd;
    }

    .user-name { 
        font-size: 1.8rem; font-weight: 800; margin: 10px 0 5px; 
        color: var(--dark); letter-spacing: -0.5px; 
    }
    
    .level-badge { 
        display: inline-flex; align-items: center; gap: 8px;
        background: var(--accent); color: var(--dark);
        padding: 6px 16px; border-radius: 20px; 
        font-size: 0.95rem; font-weight: 800; margin-top: 5px;
    }

    /* Barra de Progresso XP */
    .xp-container {
        margin-top: 20px; width: 100%;
        background: var(--segmented-bg); height: 10px; border-radius: 10px;
        position: relative; overflow: hidden;
    }
    .xp-bar {
        width: 65%; /* Valor de exemplo dinâmico */
        height: 100%; background: var(--primary); border-radius: 10px;
    }
    .xp-text { font-size: 0.8rem; color: var(--grey); margin-top: 5px; font-weight: 600; }

    .btn-edit {
        margin-top: 25px; width: 100%; padding: 14px;
        background: var(--surface); border: 2px solid var(--btn-ghost-border);
        border-radius: 16px; font-family: 'Fredoka', sans-serif; font-weight: 700; cursor: pointer; color: var(--primary);
        transition: transform 0.1s;
        box-shadow: 0 5px 0 var(--btn-ghost-border); text-transform: uppercase; font-size: 0.95rem;
    }
    .btn-edit:hover { border-color: var(--primary); background: var(--hover-light); }
    .btn-edit:active { transform: translateY(5px); box-shadow: none; }

    /* DIREITA (CONTENT) */
    .content-area { display: flex; flex-direction: column; gap: 24px; }

    /* Stats Grid - Estilo Blocos */
    .stats-row {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    }

    .stat-card {
        background: var(--surface); padding: 20px; border-radius: 20px;
        
        display: flex; flex-direction: column; align-items: flex-start;
        transition: transform 0.2s; position: relative; overflow: hidden;
        border-top: 5px solid var(--stat-card-default-border); /* Cor padrão, mudada abaixo */
    }
    .stat-card:hover { }
    
    /* Cores específicas para cada bloco de stat */
    .stat-card.yellow { border-top-color: #ffce00; }
    .stat-card.red { border-top-color: #ff6b6b; }
    .stat-card.green { border-top-color: #a270f4; }
    .stat-card.purple { border-top-color: #1cb0f6; }

    .stat-icon {
        width: 45px; height: 45px; border-radius: 12px; 
        display: flex; align-items: center; justify-content: center;
        margin-bottom: 12px; font-size: 1.3rem;
    }
    .stat-card.yellow .stat-icon { background: #FFF4E5; color: #ffce00; }
    .stat-card.red .stat-icon { background: #FFE5E9; color: #ff6b6b; }
    .stat-card.green .stat-icon { background: #F0EBFF; color: #a270f4; }
    .stat-card.purple .stat-icon { background: #F0EBFF; color: #1cb0f6; }

    .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--dark); line-height: 1; }
    .stat-label { font-size: 0.85rem; color: var(--grey); font-weight: 700; margin-top: 5px; }

    /* BIOGRAFIA - Cartão separado */
    .bio-card {
        background: var(--surface); border-radius: 22px;
        padding: 22px 24px;
        
        border: 2px solid var(--surface);
    }
    .bio-card-header {
        display: flex; align-items: center; gap: 8px;
        font-family: 'Fredoka', sans-serif; font-weight: 700;
        font-size: 1rem; color: var(--dark); margin-bottom: 10px;
    }
    .bio-edit-btn {
        margin-left: auto; background: none; border: none;
        color: var(--grey); cursor: pointer; font-size: 0.9rem;
        width: 32px; height: 32px; border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        transition: 0.2s;
    }
    .bio-edit-btn:hover {
        background: var(--hover-light-purple); color: var(--secondary);
    }
    .bio-section {
        margin-top: 20px; padding: 18px;
        background: var(--accent-light-bg); border-radius: 16px;
        border: 1px dashed var(--border);
    }
    .bio-text {
        font-family: 'Nunito', sans-serif; font-size: 0.95rem;
        color: var(--dark); line-height: 1.6; margin: 0;
        font-weight: 600; text-align: center;
        word-break: break-word;
    }
    .bio-text.bio-placeholder {
        color: #B0BEC5; font-style: italic; font-weight: 400;
    }

    /* MODAL - Bio textarea */
    .modal-bio-section {
        margin-top: 18px; text-align: left;
    }
    .modal-bio-label {
        font-family: 'Fredoka', sans-serif; font-weight: 700;
        font-size: 1rem; color: var(--dark); margin-bottom: 8px;
        display: flex; align-items: center; gap: 8px;
    }
    .modal-bio-textarea {
        width: 100%; min-height: 80px; max-height: 140px; resize: vertical;
        padding: 14px 16px; border: 2px solid var(--input-border); border-radius: 16px;
        font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 600;
        color: var(--dark); background: var(--input-bg); outline: none;
        transition: border-color 0.2s;
        box-sizing: border-box;
    }
    .modal-bio-textarea:focus {
        border-color: var(--primary); background: var(--surface);
    }
    .modal-bio-counter {
        text-align: right; font-size: 0.8rem; color: var(--grey);
        font-weight: 600; margin-top: 4px;
    }

    /* VITRINE - Showcase Carousel */
    .showcase-block {
        border-left-color: var(--secondary) !important;
    }
    .showcase-carousel-wrapper {
        display: flex; align-items: center; gap: 10px;
        width: 100%;
    }
    .showcase-carousel {
        display: flex; flex-wrap: nowrap; gap: 18px;
        overflow-x: auto;
        padding: 12px 10px 32px 10px;
        scroll-behavior: smooth;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        flex: 1; min-width: 0;
    }
    .showcase-carousel::-webkit-scrollbar { display: none; }

    .showcase-nav-btn {
        flex-shrink: 0;
        width: 42px; height: 42px; border-radius: 50%; border: none;
        background: var(--surface); color: var(--secondary);
        cursor: pointer; z-index: 10; font-size: 1.1rem;
        transition: all 0.2s; display: flex; align-items: center; justify-content: center;
    }
    .showcase-nav-btn:hover { background: var(--secondary); color: white; transform: scale(1.1); }

    .showcase-card-link {
        text-decoration: none; color: inherit; display: block;
        flex-shrink: 0; width: min(200px, calc(50% - 18px));
        scroll-snap-align: start;
    }
    .showcase-card {
        background: var(--surface); border-radius: 18px; overflow: hidden;
        transition: transform 0.2s;
        border: 2px solid transparent;
        height: 100%;
    }
    .showcase-card:hover {
        border-color: var(--secondary);
    }
    .showcase-img {
        position: relative; height: 120px; background: var(--showcase-img-bg); overflow: hidden;
    }
    .showcase-img img {
        width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s;
    }
    .showcase-card:hover .showcase-img img { transform: scale(1.06); }

    .showcase-info {
        padding: 14px;
    }
    .showcase-info h4 {
        margin: 0 0 10px; font-size: 0.95rem; font-weight: 700; color: var(--dark);
        line-height: 1.3;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .showcase-actions {
        display: flex; justify-content: flex-end;
    }
    .showcase-play {
        background: var(--showcase-play-bg); color: var(--secondary);
        font-weight: 800; font-size: 0.8rem; padding: 5px 12px; border-radius: 10px;
        box-shadow: 0 2px 0 var(--showcase-play-shadow); transition: 0.15s;
    }
    .showcase-card:hover .showcase-play {
        background: var(--secondary); color: white;
        box-shadow: 0 2px 0 #5649b8;
    }

    /* Showcase - empty state */
    .showcase-empty {
        text-align: center; padding: 40px 20px; width: 100%;
        display: flex; flex-direction: column; align-items: center; gap: 10px;
    }
    .showcase-empty p {
        color: var(--grey); font-weight: 600; font-size: 1rem; margin: 0;
    }
    .btn-create-first {
        display: inline-flex; align-items: center; gap: 8px;
        background: var(--secondary); color: white;
        padding: 10px 22px; border-radius: 14px;
        font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 0.95rem;
        text-decoration: none; margin-top: 8px;
        box-shadow: 0 4px 0 #5649b8; transition: 0.15s;
    }
    .btn-create-first:hover { filter: brightness(1.08); }
    .btn-create-first:active { transform: translateY(4px); box-shadow: none; }

    /* Placeholder art for quiz cards without cover - Genii Branded Fallback */
    .placeholder-art {
        width: 100%; height: 100%;
        display: flex; align-items: center; justify-content: center;
        background: var(--sub-tab-bg);
        color: #00D2BA;
        font-family: 'Fredoka', sans-serif;
        font-weight: 700;
        font-size: 2rem;
        letter-spacing: 1px;
        user-select: none;
    }

    /* PUBLIC PROFILE - read-only variant */
    .profile-card-readonly .btn-edit { display: none; }
    .profile-card-readonly .profile-pic-wrapper { cursor: default; }
    .profile-card-readonly .profile-pic-wrapper:hover { transform: none; }
    .profile-card-readonly .edit-overlay { display: none !important; }

    /* CARD DE MISSÕES / ATIVIDADE */
    .dashboard-block {
        background: var(--surface); padding: 30px; border-radius: 24px;
         flex: 1;
    }
    
    .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
    .section-title { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
    
    /* Lista de Missões (Gamification) */
    .mission-list { display: flex; flex-direction: column; gap: 15px; }
    .mission-item {
        display: flex; align-items: center; gap: 15px;
        background: var(--mission-item-bg); padding: 15px; border-radius: 16px;
        border: 1px solid var(--border); transition: 0.2s;
    }
    .mission-item:hover { background: var(--surface); border-color: var(--primary); }
    
    .mission-check {
        width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--mission-check-border);
        background: var(--surface);
        display: flex; align-items: center; justify-content: center; color: white;
    }
    .mission-item.done .mission-check { background: var(--success); border-color: var(--success); }
    
    .mission-info h4 { margin: 0; font-size: 1rem; font-weight: 700; }
    .mission-info p { margin: 2px 0 0; font-size: 0.85rem; color: var(--grey); }
    
    .mission-xp { margin-left: auto; font-weight: 700; color: var(--accent); font-size: 0.9rem; }

    /* --- MODAL --- */
    .modal {
        display: none; position: fixed; inset: 0; z-index: 2000;
        background: rgba(45, 52, 54, 0.6);
        align-items: center; justify-content: center;
    }

    @media (max-width: 640px) {
        .modal {
            align-items: flex-end;
        }
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        position: relative;
    }

    .modal-header h2 {
        margin: 0;
        font-size: 1.5rem;
        color: var(--dark);
    }

    .close-modal {
        font-size: 2rem;
        color: var(--grey);
        cursor: pointer;
        line-height: 1;
        padding: 5px;
        transition: 0.2s;
        position: absolute;
        right: -10px;
        top: -10px;
    }

    .close-modal:hover { color: var(--danger); }

    .modal-content {
        background: var(--modal-bg); padding: 30px; border-radius: 24px;
        width: 90%; max-width: 700px; text-align: center; position: relative;
        max-height: 90vh; overflow-y: auto;
    }

    /* Overrides específicos para o modal do editor de avatar */
    .modal-avatar-editor {
        max-width: 720px;
    }

    /* ===== SEGMENTED CONTROL (iOS‑style) ===== */
    .segmented-control {
        display: flex;
        position: relative;
        background: var(--segmented-bg);
        border-radius: 14px;
        padding: 4px;
        margin-bottom: 24px;
        gap: 0;
    }
    .seg-btn {
        flex: 1;
        padding: 11px 16px;
        border: none;
        background: transparent;
        border-radius: 11px;
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--grey);
        cursor: pointer;
        transition: color 0.25s;
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    .seg-btn i { font-size: 1rem; }
    .seg-btn.active { color: var(--primary); }
    .seg-slider {
        position: absolute;
        top: 4px; left: 4px;
        width: calc(50% - 4px);
        height: calc(100% - 8px);
        background: var(--surface);
        border-radius: 11px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1;
    }

    /* ===== AVATAR EDITOR AREA (horizontal) ===== */
    #avatar-editor-area {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 28px;
        align-items: start;
        text-align: left;
        overflow: hidden;
    }

    /* Preview "solto" - sem caixa, sem borda */
    .avatar-preview-floating {
        position: relative;
        width: 200px;
        height: 200px;
        margin: 0;
        position: sticky;
        top: 0;
    }
    .avatar-preview-floating img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        height: 90%;
        object-fit: contain;
    }

    /* Painel de opções (lado direito) */
    .avatar-options-panel {
        display: flex;
        flex-direction: column;
        gap: 14px;
        min-width: 0; /* evita overflow em grid */
    }

    /* Sub-tabs para Skins / Caras / Chapéus */
    .sub-tabs {
        display: flex;
        gap: 8px;
    }
    .sub-tab {
        flex: 1;
        padding: 9px 10px;
        border: 2px solid transparent;
        background: var(--sub-tab-bg);
        border-radius: 12px;
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--grey);
        cursor: pointer;
        transition: 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    .sub-tab:hover { background: var(--surface); border-color: var(--input-border); }
    .sub-tab.active {
        background: var(--hover-light);
        color: var(--primary);
        border-color: var(--primary);
    }
    .sub-tab i { font-size: 0.9rem; }

    /* Options grid - dentro do painel direito */
    #avatar-editor-area .options-grid {
        max-height: 260px;
    }

    /* ===== PHOTO UPLOAD AREA (redesenhado) ===== */
    .photo-upload-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 10px 20px 20px;
    }
    .photo-preview-frame {
        width: 200px;
        height: 200px;
        border-radius: 24px;
        overflow: hidden;
        position: relative;
        cursor: pointer;
        background: var(--segmented-bg);
        transition: transform 0.2s;
    }
    .photo-preview-frame:hover { transform: scale(1.03); }
    .photo-preview-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .photo-overlay-hint {
        position: absolute;
        inset: 0;
        background: rgba(45, 52, 54, 0.35);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white;
        gap: 6px;
        font-weight: 700;
        font-size: 0.85rem;
        opacity: 0;
        transition: opacity 0.2s;
        border-radius: 24px;
    }
    .photo-overlay-hint i { font-size: 1.6rem; }
    .photo-preview-frame:hover .photo-overlay-hint { opacity: 1; }

    .btn-upload-photo {
        background: var(--segmented-bg);
        color: var(--dark);
        border: 2px solid var(--input-border);
        padding: 11px 24px;
        border-radius: 14px;
        font-family: 'Nunito', sans-serif;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        transition: 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .btn-upload-photo:hover {
        background: var(--hover-light);
        border-color: var(--primary);
        color: var(--primary);
    }
    .upload-hint {
        font-size: 0.8rem;
        color: var(--grey);
        margin: 0;
        font-weight: 600;
    }

    /* ══════════════════════════════════════
       AVATAR MODAL (Lobby-style bottom sheet)
       ══════════════════════════════════════ */
    .avatar-modal-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 9000;
        align-items: flex-end;
        justify-content: center;
    }
    .avatar-modal-overlay.open {
        display: flex;
        animation: fadeIn 0.2s ease;
    }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

    .avatar-modal {
        background: var(--modal-bg, var(--surface));
        border-radius: 28px 28px 0 0;
        width: 100%;
        max-width: 560px;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        animation: slideUp 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
        border: 2px solid var(--border);
        border-bottom: none;
        overflow-y: auto;
    }
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px 16px;
        border-bottom: 2px solid var(--border);
        flex-shrink: 0;
    }
    .modal-top-bar h3 {
        font-family: 'Fredoka', sans-serif;
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--dark);
        margin: 0;
    }
    .modal-close-btn {
        width: 38px; height: 38px;
        border-radius: 12px;
        background: var(--bg-light);
        border: 2px solid var(--border);
        color: var(--grey);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 3px 0 var(--border);
        transition: all 0.15s;
    }
    .modal-close-btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--border); }
    .modal-close-btn:active { transform: translateY(3px); box-shadow: 0 0 0 transparent !important; }

    /* Avatar editor area inside lobby modal */
    #avatarModeArea {
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 20px;
        padding: 24px;
        align-items: start;
        flex-shrink: 0;
    }

    /* Options grid - lobby style */
    .opt-item {
        aspect-ratio: 1;
        border-radius: 16px;
        background: var(--option-item-bg, var(--bg-light));
        cursor: pointer;
        border: 3px solid transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
        position: relative;
    }
    .opt-item:hover { transform: scale(1.05); background: var(--border); }
    .opt-item.selected {
        border-color: var(--primary);
        background: rgba(0, 207, 193, 0.1);
    }
    .opt-item img {
        width: 80%; height: 80%;
        object-fit: contain;
    }
    .opt-none-item {
        font-size: 1.4rem;
        color: var(--grey);
        flex-direction: column;
        gap: 4px;
    }
    .opt-none-item span {
        font-size: 0.75rem;
        font-family: 'Fredoka', sans-serif;
        font-weight: 600;
    }

    /* Modal save bar */
    .modal-save-bar {
        padding: 14px 24px 20px;
        border-top: 2px solid var(--border);
        display: flex;
        gap: 10px;
        flex-shrink: 0;
    }
    .modal-save-bar .save-btn.primary {
        background: var(--primary);
        color: white;
        box-shadow: 0 5px 0 var(--primary-dark);
    }
    .modal-save-bar .save-btn.primary:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--primary-dark); }
    .modal-save-bar .save-btn.primary:active { transform: translateY(5px); box-shadow: 0 0 0 transparent !important; }
    .modal-save-bar .save-btn.secondary {
        background: var(--bg-light);
        color: var(--grey);
        border: 2px solid var(--border);
        box-shadow: 0 4px 0 var(--border);
        flex: 0.5;
    }
    .modal-save-bar .save-btn.secondary:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--border); }
    .modal-save-bar .save-btn.secondary:active { transform: translateY(4px); box-shadow: 0 0 0 transparent !important; }

    @media (min-width: 600px) {
        .avatar-modal {
            border-radius: 28px;
            border-bottom: 2px solid var(--border);
            max-height: 80vh;
            margin-bottom: 5vh;
            max-width: 600px;
        }
        .avatar-modal-overlay {
            align-items: center;
        }
    }

    /* Esconder old tabs (caso exista noutro sítio que não o editor) */
    .tabs { display: flex; gap: 10px; margin-bottom: 20px; justify-content: center; background: var(--segmented-bg); padding: 5px; border-radius: 12px; }
    .tab-btn { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 8px; font-weight: 700; color: var(--grey); cursor: pointer; transition: 0.2s; }
    .tab-btn.active { background: var(--surface); color: var(--primary); }

    /* Manter avatar-preview-box para outros modais que usem */
    .avatar-preview-box {
        position: relative;
        width: 200px;
        height: 200px;
        margin: 0 auto 25px;
        background: var(--hover-light);
        border-radius: 24px;
        overflow: hidden;
        border: 4px solid var(--surface);
    }
    .avatar-preview-box img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* Centralizar perfeitamente */
        width: 85%;          /* Margem de respiro */
        height: 85%;
        object-fit: contain; /* CRUCIAL: Impede que a imagem estique */
    }
    .controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
    .control-btn { background: var(--light-blue-bg); border: none; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--dark); transition: 0.2s; font-weight: bold; }
    .control-btn:hover { background: var(--primary); color: white; }
    .upload-area { display: none; margin: 20px 0; }
    .file-input-label { display: block; padding: 40px; border: 2px dashed var(--border); border-radius: 16px; cursor: pointer; color: var(--grey); transition: 0.2s; background: var(--surface); }
    .file-input-label:hover { border-color: var(--primary); color: var(--primary); background: var(--hover-light); }
    .save-btn { background: var(--primary); color: white; width: 100%; padding: 14px; border: none; border-radius: 16px; font-family: 'Fredoka', sans-serif; font-weight: 700; cursor: pointer; margin-top: 15px; font-size: 1rem; box-shadow: 0 5px 0 var(--primary-dark); transition: transform 0.1s; text-transform: uppercase; }
    .save-btn:hover { filter: brightness(1.08); }
    .save-btn:active { transform: translateY(5px); box-shadow: none; }

    @media (max-width: 900px) {
        /* Sidebar is now handled by components.js (.genii-sidebar) */
        .main-content { margin-left: 0; padding-top: 80px; }
        .main-content.has-banner { padding-top: 0; }
        .profile-grid { grid-template-columns: 1fr; }
        .profile-left { height: auto; }
        .profile-left-sticky { position: static; }
        .stats-row { grid-template-columns: 1fr 1fr; }
        .container { padding: 0 16px; margin-top: -60px; }
        .profile-banner { height: 160px; border-radius: 0 0 24px 24px; }
        .showcase-card-link { width: min(180px, calc(50% - 14px)); }
        .showcase-nav-left { left: 4px; }
        .showcase-nav-right { right: 4px; }
        .user-header-container { display: none; }
    }

    @media (max-width: 640px) {
        .modal {
            align-items: flex-end;
        }
        .modal-content {
            width: 100%; max-width: 100%; padding: 16px;
            border-radius: 20px 20px 0 0;
            max-height: 92vh;
            animation: slideUpModal 0.3s ease-out;
        }
        @keyframes slideUpModal {
            from { transform: translateY(100%); }
            to { transform: translateY(0); }
        }
        .modal-avatar-editor {
            max-width: 100%;
        }
        #avatar-editor-area {
            grid-template-columns: 1fr !important;
            justify-items: center;
            gap: 16px;
        }
        .avatar-preview-floating {
            width: 100px !important; height: 100px !important;
            position: relative !important;
            margin: 0 auto 8px;
            overflow: hidden;
        }
        .avatar-preview-floating img {
            width: 100% !important;
            height: 100% !important;
            object-fit: contain !important;
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
        }

        /* Lobby-style modal responsive */
        .avatar-modal {
            max-height: 90vh;
            border-radius: 20px 20px 0 0;
        }
        .avatar-modal-overlay {
            align-items: flex-end;
        }
        #avatarModeArea {
            grid-template-columns: 1fr;
            justify-items: center;
            gap: 14px;
            padding: 12px 16px;
        }
        #avatarModeArea .avatar-preview-floating {
            width: 130px !important; height: 130px !important;
        }
        .opt-item { border-radius: 12px; }
        .options-grid { max-height: 180px; gap: 8px; }
        .modal-save-bar { padding: 12px 16px 16px; }
        .modal-top-bar { padding: 16px 16px 12px; }
        .modal-top-bar h3 { font-size: 1.1rem; }
        .segmented-control { margin: 12px 16px 0; }
        .avatar-options-panel {
            width: 100%;
        }
        #avatar-editor-area .options-grid {
            max-height: 180px;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        .sub-tabs {
            gap: 4px;
        }
        .sub-tab {
            padding: 8px 6px;
            font-size: 0.8rem;
            gap: 4px;
        }
        .photo-preview-frame {
            width: 100px !important; height: 100px !important;
            border-radius: 20px;
        }
        .seg-btn {
            font-size: 0.85rem;
            padding: 10px 10px;
            gap: 6px;
        }
        .showcase-card-link { width: min(160px, calc(50% - 12px)); }
        .showcase-card .showcase-img { height: 100px; }
        .showcase-card .showcase-info { padding: 10px; }
        .showcase-card .showcase-play { padding: 8px 12px; font-size: 0.8rem; }
        .bio-card { padding: 16px 18px; }
        .showcase-nav-btn { width: 34px; height: 34px; font-size: 0.85rem; }

        /* Dashboard mobile refinements */
        .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
        .stat-card { padding: 16px; }
        .stat-value { font-size: 1.5rem; }
        .container { padding: 0 12px; }
        .dashboard-block { padding: 20px 16px; }
        .profile-banner { height: 130px; }
        .user-name { font-size: 1.5rem; }
        .profile-pic-wrapper { width: 130px; height: 130px; }

        /* Modal bio and save button */
        .modal-bio-textarea { min-height: 60px; font-size: 0.9rem; padding: 12px; }
        .save-btn { padding: 12px; font-size: 0.9rem; border-radius: 14px; }
        .modal-header h2 { font-size: 1.3rem; }
        .close-modal { font-size: 1.6rem; }
    }

    /*------------------------------------------------ DISCOVER ------------------------------------------------ */

    .discover-banner {
            height: 220px;
            background: linear-gradient(135deg, var(--secondary) 0%, #7B4DFF 100%);
            position: relative;
            border-bottom-left-radius: 40px;
            border-bottom-right-radius: 40px;
            display: flex; align-items: center; justify-content: center;
            overflow: hidden;
        }

        .banner-content { text-align: center; color: white; position: relative; z-index: 2; margin-top: -20px; }
        .banner-title { font-size: 2.2rem; font-weight: 800; margin: 0; }
        .banner-subtitle { font-size: 1.1rem; opacity: 0.9; margin-top: 5px; font-weight: 500; }

        .deco-circle { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1); }
        .dc-1 { width: 100px; height: 100px; top: 20px; left: 10%; }
        .dc-2 { width: 200px; height: 200px; bottom: -50px; right: 5%; }
        .dc-3 { width: 50px; height: 50px; top: 40px; right: 20%; }

        .discover-container { 
            max-width: 1200px; 
            margin: 30px auto 40px; 
            padding: 0 16px; 
            position: relative; 
            z-index: 5; 
        }

        .section-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; }
        .section-title { font-size: 1.4rem; font-weight: 800; color: var(--dark); display: flex; align-items: center; gap: 10px; }
        .section-title i { color: var(--accent); } 

        .quiz-carousel-wrapper { display: flex; align-items: center; gap: 10px; width: 100%; }

        .quiz-carousel {
            display: flex; gap: 14px; overflow-x: auto; 
            padding: 10px 0 30px 0; 
            scroll-behavior: smooth;
            scrollbar-width: none;
            flex: 1; min-width: 0;
        }
        .quiz-carousel::-webkit-scrollbar { display: none; }

        .nav-btn {
            flex-shrink: 0;
            width: 38px; height: 38px; border-radius: 50%; border: none;
            background: var(--surface); color: var(--primary);
            cursor: pointer; z-index: 10; font-size: 1rem;
            transition: all 0.2s; display: flex; align-items: center; justify-content: center;
        }
        .nav-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }

        /* CARDS */
        .quiz-card-link {
            text-decoration: none; color: inherit; display: block; flex-shrink: 0;
            width: 320px; min-width: 0;
        }

        .quiz-card {
            background: var(--surface); border-radius: 16px;
            overflow: hidden;
            transition: transform 0.2s;
            border: 2px solid transparent;
            position: relative;
        }
        .quiz-card::before {
            content: '';
            position: absolute;
            width: 100px;
            height: 250%;
            background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.08) 70%, rgba(255,255,255,0) 100%);
            top: -75%;
            left: -100px;
            z-index: 5;
            pointer-events: none;
            filter: blur(8px);
        }
        .quiz-card:hover {
            border-color: var(--primary);
        }
        .quiz-card:hover::before {
            animation: cardShine 1.5s ease 0.6s forwards;
        }

        @keyframes cardShine {
            0% { left: -100px; }
            100% { left: calc(100% + 100px); }
        }

        .quiz-image-box { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--image-placeholder); overflow: hidden; border-radius: 16px; }
        .quiz-image-box::after {
            content: ''; position: absolute; inset: 0; border-radius: 16px;
            background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
        }
        .quiz-image-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }

        .placeholder-art {
            width: 100%; height: 100%;
            background: var(--sub-tab-bg);
            display: flex; align-items: center; justify-content: center;
            color: #00D2BA;
            font-family: 'Fredoka', sans-serif;
            font-weight: 700;
            font-size: 2rem;
            letter-spacing: 1px;
            user-select: none;
            margin-top: -30px;
        }

        .q-badge {
            position: absolute; top: 10px; right: 10px; z-index: 3;
            background: rgba(0, 0, 0, 0.6);
            color: white; font-size: 0.75rem; font-weight: 700;
            padding: 4px 10px; border-radius: 12px;
            display: flex; align-items: center; gap: 5px;
        }

        .quiz-content {
            position: absolute; bottom: 0; left: 0; right: 0;
            padding: 18px; z-index: 2;
        }
        .q-title { 
            font-size: 1.1rem; font-weight: 700; color: white; margin: 0 0 6px 0;
            line-height: 1.3;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .q-desc { display: none; }
        
        .q-footer {
            margin-top: 8px; padding-top: 0; border-top: none;
            display: flex; align-items: center; justify-content: space-between;
        }
        .q-footer span { font-size: 0.8rem; color: rgba(255,255,255,0.7); }
        .btn-play {
            background: rgba(255,255,255,0.2); color: white;
            font-weight: 800; font-size: 0.85rem; padding: 6px 14px; border-radius: 10px;
            box-shadow: none; backdrop-filter: blur(4px); transition: transform 0.1s, background 0.2s;
        }
        .btn-play:active { transform: translateY(3px); }
        .quiz-card:hover .btn-play { background: var(--primary); color: white; box-shadow: none; }

        .loading-container { text-align: center; padding: 40px; color: var(--loading-text); width: 100%; }

        .user-header-container {
            position: fixed;
            top: 20px;
            right: 30px;
            z-index: 1000;
        }

        .user-widget {
            background: var(--surface);
            padding: 8px 16px 8px 8px; /* Padding ajustado para a foto */
            border-radius: 50px;
            display: flex;
            align-items: center;
            gap: 12px;
            border: 2px solid var(--surface);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .user-widget:hover {
        }

        .user-avatar-small {
            width: 40px; height: 40px;
            border-radius: 14px;
            object-fit: cover;
            background: var(--hover-light);
            border: 2px solid var(--hover-light);
        }

        .user-avatar-wrapper {
            width: 40px; height: 40px;
            border-radius: 14px;
            overflow: hidden; 
            background: var(--hover-light);
            border: 2px solid var(--hover-light);
            position: relative; 
            flex-shrink: 0;
        }

        .widget-photo {
            width: 100%; height: 100%;
            object-fit: cover;
        }

        .w-body { z-index: 1; }
        .w-outfit { z-index: 2; }
        .w-acc { z-index: 3; }

        .user-info-mini {
            display: flex;
            flex-direction: column;
            line-height: 1.2;
        }

        .widget-layer {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            height: auto;
            transform: scale(1.25);
            top: -4px;
        }

        .user-name-mini {
            font-weight: 800;
            font-size: 0.95rem;
            color: var(--dark);
        }

        .user-role-mini {
            font-size: 0.75rem;
            color: var(--grey);
            font-weight: 600;
        }

        .chevron-icon {
            color: var(--grey);
            font-size: 0.8rem;
            margin-left: 5px;
            transition: transform 0.3s;
        }

        /* Estado Ativo (Dropdown Aberto) */
        .user-widget.active .chevron-icon {
            transform: rotate(180deg);
        }

        /* --- DROPDOWN MENU --- */
        .user-dropdown-menu {
            position: absolute;
            top: 110%;
            right: 0;
            width: 220px;
            background: var(--dropdown-bg);
            border-radius: 16px;
            padding: 10px;
            display: none; /* Escondido por defeito */
            flex-direction: column;
            gap: 5px;
            border: 1px solid var(--card-actions-border);
            animation: fadeInDrop 0.2s ease;
        }

        .user-dropdown-menu.show {
            display: flex;
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 15px;
            border-radius: 10px;
            color: var(--grey);
            font-weight: 600;
            text-decoration: none;
            transition: 0.2s;
            font-size: 0.9rem;
            background: transparent;
            border: none;
            width: 100%;
            text-align: left;
            cursor: pointer;
        }

        .dropdown-item:hover {
            background: var(--hover-light);
            color: var(--primary);
        }

        .dropdown-item.danger:hover {
            background: var(--badge-coral-bg);
            color: var(--coral);
        }

        @keyframes fadeInDrop {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Atualização para a Sidebar (Botão Ajuda) */
        .user-mini.help-btn {
            background: var(--stat-green-bg); /* Fundo Verde Clarinho */
            border-color: var(--stat-green-bg);
        }
        .user-mini.help-btn:hover {
            background: var(--hover-light);
        }
        
         /* --- ESTILO ESPECÍFICO DASHBOARD (GAME ENTRY) --- */

        /* Container Central */
        .game-entry-container {
            width: 100%; max-width: 480px;
            padding: 20px; text-align: center;
            position: relative; z-index: 10;
        }

        /* Saudação */
        .greeting-area { margin-bottom: 30px; }
        .greeting-area h1 { font-size: 2.2rem; font-weight: 800; color: var(--dark); margin: 0; }
        .greeting-area p { color: var(--grey); font-size: 1.1rem; margin-top: 5px; }

        /* CARTÃO DE PIN (Estilo Kahoot) */
        .pin-card {
            background: var(--pin-card-bg); border-radius: 24px;
            padding: 40px 30px;
            border: 2px solid var(--pin-card-bg);
            transition: transform 0.3s;
        }
        .pin-card:hover { border-color: var(--hover-light); }

        .pin-input {
            width: 100%;
            padding: 15px;
            font-size: 1.8rem; font-weight: 800; text-align: center;
            letter-spacing: 4px; color: var(--dark);
            border: 3px solid var(--pin-input-border); border-radius: 12px;
            background: var(--pin-input-bg); transition: 0.2s;
            margin-bottom: 20px;
        }
        .pin-input:focus {
            outline: none; border-color: var(--primary); background: var(--surface);
        }
        .pin-input::placeholder { color: var(--text-ghost); letter-spacing: 1px; font-weight: 600; font-size: 1.5rem; }

        .btn-enter {
            width: 100%;
            padding: 18px;
            background: var(--primary); color: white;
            font-family: 'Fredoka', sans-serif;
            font-size: 1.2rem; font-weight: 800;
            border: none; border-radius: 16px;
            cursor: pointer; transition: transform 0.1s;
            box-shadow: 0 6px 0 var(--primary-dark);
            text-transform: uppercase;
        }
        .btn-enter:hover {
            filter: brightness(1.08);
            box-shadow: 0 8px 0 var(--primary-dark);
        }
        .btn-enter:active {
            transform: translateY(5px);
            box-shadow: none;
        }

        /* Decoração Flutuante (Background Fun) */
        .floating-shape {
            position: absolute; opacity: 0.6; z-index: 0;
            animation: float 6s ease-in-out infinite;
        }
        @keyframes float {
            0% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(5deg); }
            100% { transform: translateY(0px) rotate(0deg); }
        }

        .shape-1 { top: 15%; left: 30%; color: var(--accent); font-size: 3rem; animation-delay: 0s; }
        .shape-2 { bottom: 20%; right: 10%; color: var(--primary); font-size: 4rem; animation-delay: 1s; }
        .shape-3 { top: 20%; right: 20%; color: var(--danger); font-size: 2rem; animation-delay: 2s; }
        .shape-4 { bottom: 15%; left: 15%; color: var(--success); font-size: 2.5rem; animation-delay: 3s; }

        /* Ações Rápidas */
        .quick-actions {
            margin-top: 40px; display: flex; gap: 15px; justify-content: center;
        }
        .action-chip {
            background: var(--action-chip-bg); padding: 10px 20px; border-radius: 16px;
            text-decoration: none; color: var(--grey); font-weight: 700;
            font-size: 0.9rem; box-shadow: 0 4px 0 var(--action-chip-shadow);
            transition: transform 0.1s, color 0.2s; display: flex; align-items: center; gap: 8px;
        }
        .action-chip:hover { color: var(--primary); box-shadow: 0 6px 0 var(--action-chip-shadow); }
        .action-chip:active { transform: translateY(5px); box-shadow: none; }

        /* Animação da Mão */
        .wave {
            animation-name: wave-animation;
            animation-duration: 2.5s;
            animation-iteration-count: infinite;
            transform-origin: 70% 70%;
            display: inline-block;
        }

        .options-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            max-height: 300px;
            overflow-y: auto;
            padding: 5px;
        }
        .option-item {
            background: var(--option-item-bg);
            border-radius: 16px;
            padding: 10px;
            cursor: pointer;
            border: 3px solid transparent;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            aspect-ratio: 1/1;
        }

        .option-item img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
        .option-item:hover { background: var(--surface); }
        .option-item.selected { border-color: var(--primary); background: var(--hover-light); }

        /* Face options need a darker background since face images are white */
        .option-item.face-option { background: var(--option-face-bg); }
        .option-item.face-option:hover { background: var(--border); }
        .option-item.face-option.selected { background: var(--hover-light); }

        .option-none {
            grid-column: 1 / -1;
            height: 50px;
            aspect-ratio: auto;
            background-color: var(--badge-coral-bg);
            color: var(--danger);
            font-weight: 700;
            gap: 10px;
        }

        .option-none:hover { background-color: var(--badge-coral-hover); border-color: var(--danger); }

        @keyframes wave-animation {
            0% { transform: rotate( 0.0deg) }
            10% { transform: rotate(14.0deg) }
            20% { transform: rotate(-8.0deg) }
            30% { transform: rotate(14.0deg) }
            40% { transform: rotate(-4.0deg) }
            50% { transform: rotate(10.0deg) }
            60% { transform: rotate( 0.0deg) }
            100% { transform: rotate( 0.0deg) }
        }

        @media (max-width: 600px) {
            .pin-input { font-size: 1.4rem; }
            .floating-shape { display: none; }
            .game-entry-container { padding: 16px; }
            .greeting-area h1 { font-size: 1.8rem; }
            .greeting-area p { font-size: 1rem; }
            .pin-card { padding: 24px 20px; border-radius: 20px; }
            .pin-input { font-size: 1.4rem; padding: 12px; letter-spacing: 2px; }
            .btn-enter { padding: 14px; font-size: 1.1rem; }
            .quick-actions { flex-direction: column; gap: 10px; margin-top: 30px; }
            .action-chip { justify-content: center; padding: 12px 20px; }
        }

         @media (max-width: 900px) {
            .discover-banner { height: 180px; border-radius: 0 0 30px 30px; padding-top: 60px; }
            .banner-content { margin-top: 0; }
            .discover-container { margin-top: 20px; padding: 0 20px; }
            .nav-btn { display: none; } 
            .showcase-nav-btn { display: none !important; }
            .banner-title { font-size: 1.5rem; }
            .quiz-carousel { overflow-x: auto; gap: 12px; }
            .quiz-card-link { width: 52%; min-width: 0; }
        }

        @media (max-width: 480px) {
            .discover-banner { height: 160px; padding-top: 60px; }
            .discover-container { margin-top: 16px; padding: 0 12px; }
            .banner-title { font-size: 1.3rem; }
            .banner-subtitle { font-size: 0.9rem; }
            .section-title { font-size: 1.2rem; }
            .quiz-carousel { gap: 10px; }
            .quiz-card-link { width: 50%; min-width: 0; }
            .quiz-content { padding: 12px; }
            .q-title { font-size: 0.85rem; }
            .q-badge { font-size: 0.65rem; padding: 3px 7px; border-radius: 8px; }
            .btn-play { font-size: 0.7rem; padding: 4px 10px; border-radius: 8px; }
            .q-footer span { font-size: 0.65rem; }
        }


/* ============================================
   SKELETON LOADING SYSTEM
   ============================================ */
@keyframes skeleton-shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.skeleton-rect {
    border-radius: 24px;
}

.skeleton-circle {
    border-radius: 16px;
}

.skeleton-text {
    height: 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-text-sm {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.skeleton-text-lg {
    height: 24px;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* Skeleton quiz card — base shape (Netflix/overlay variant by default) */
.skeleton-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid transparent;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Netflix/overlay variant: image fills card, content overlaid at bottom (discover) */
.skeleton-card .skeleton-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 16px;
}

.skeleton-card .skeleton-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 45%, transparent 70%);
    pointer-events: none;
}

.skeleton-card .skeleton-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px;
    z-index: 2;
}

.skeleton-card .skeleton-card-body .skeleton-text {
    background: rgba(255,255,255,0.35);
    border-radius: 8px;
}

.skeleton-card .skeleton-card-body .skeleton-text-lg {
    background: rgba(255,255,255,0.55);
}

.skeleton-card .skeleton-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}

.skeleton-card .skeleton-card-pill {
    width: 64px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255,255,255,0.3);
}

/* Vertical variant: image top + body below with title/desc/footer (favorites, my_sets) */
.skeleton-card--vertical {
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.skeleton-card--vertical .skeleton-card-image {
    aspect-ratio: auto;
    height: 170px;
    border-radius: 0;
}

.skeleton-card--vertical .skeleton-card-image::after {
    display: none;
}

.skeleton-card--vertical .skeleton-card-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 56px;
    height: 24px;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.5) 0%,
        rgba(0,0,0,0.3) 40%,
        rgba(0,0,0,0.5) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-card--vertical .skeleton-card-body {
    position: static;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-card--vertical .skeleton-card-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 2px solid var(--border);
    margin-top: auto;
}

.skeleton-card--vertical .skeleton-card-actions .skeleton-btn {
    flex: 1;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-card--vertical .skeleton-card-actions .skeleton-btn-sm {
    width: 80px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-card--vertical .skeleton-card-actions .skeleton-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex: 0 0 auto;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* Skeleton class card v2 (matches new .class-card with overlapping avatar + footer) */
.skeleton-class-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--class-card-border, var(--border));
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 290px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.skeleton-class-card .skeleton-class-header {
    height: 100px;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(
        90deg,
        var(--primary) 0%,
        var(--secondary) 60%,
        var(--primary) 100%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

.skeleton-class-card .skeleton-class-header .skeleton-text {
    background: rgba(255,255,255,0.55);
    margin: 0;
}

.skeleton-class-card .skeleton-class-avatar {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 5;
    width: 76px;
    height: 76px;
    border-radius: 16px;
    border: 3px solid white;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-class-card .skeleton-class-body {
    flex: 1;
    padding: 15px 20px;
}

.skeleton-class-card .skeleton-class-footer {
    height: 55px;
    border-top: 1px solid var(--class-card-border, var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-radius: 0 0 16px 16px;
}

.skeleton-class-card .skeleton-class-footer .skeleton-text-sm {
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-class-card .skeleton-class-footer .skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-class-card .skeleton-class-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* Skeleton stat card (matches .stat-card) */
.skeleton-stat-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--border);
}

/* Skeleton avatar */
.skeleton-avatar {
    border-radius: 16px;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* Skeleton XP bar */
.skeleton-xp-bar {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* Skeleton mission item v2 (matches .mission-item: check + info + xp) */
.skeleton-mission-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px;
    border-radius: 16px;
    background: var(--mission-item-bg, var(--bg-light));
    margin-bottom: 10px;
}

.skeleton-mission-item .skeleton-mission-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-mission-item .skeleton-mission-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.skeleton-mission-item .skeleton-mission-xp {
    width: 72px;
    height: 14px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-left: auto;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* Skeleton quiz preview card v2 (matches .game-preview-card in quiz.html with index+timer badges) */
.skeleton-preview-card {
    background: var(--bg-off, var(--bg-light));
    border-radius: 24px;
    border: 2px solid var(--border);
    min-height: 310px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 0 var(--border);
}

.skeleton-preview-card .skeleton-preview-badges {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
    z-index: 3;
    pointer-events: none;
}

.skeleton-preview-card .skeleton-preview-index {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-preview-card .skeleton-preview-timer {
    width: 52px;
    height: 28px;
    border-radius: 14px;
    background: linear-gradient(
        90deg,
        var(--border) 0%,
        var(--bg-light) 40%,
        var(--border) 80%
    );
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-preview-card .skeleton-preview-inner {
    padding: 14px;
    padding-top: 50px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Skeleton settings card */
.skeleton-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.skeleton-settings-row:last-child {
    border-bottom: none;
}

/* Fade-out transition when real content replaces skeleton */
.skeleton-fade-out {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Skeleton grid helpers */
.skeleton-grid {
    display: grid;
    gap: 25px;
}

.skeleton-grid-quiz {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.skeleton-grid-classes {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.skeleton-grid-stats {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .skeleton-grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Skeleton carousel placeholder */
.skeleton-carousel {
    display: flex;
    gap: 20px;
    overflow: hidden;
}

.skeleton-carousel .skeleton-card {
    width: 320px;
    min-width: 0;
    flex-shrink: 0;
}

.quiz-carousel > .skeleton-card {
    width: 320px;
    min-width: 0;
    flex-shrink: 0;
}

/* Skeleton post card (class.html feed) */
.skeleton-post-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
}

.skeleton-post-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.skeleton-post-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Skeleton assignment card (class.html trabalhos tab) */
.skeleton-assignment-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border-radius: 16px;
    padding: 16px 20px;
}

.skeleton-assignment-left {
    flex-shrink: 0;
}

.skeleton-assignment-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-assignment-right {
    flex-shrink: 0;
}

/* Skeleton hero text (class.html banner) */
.skeleton-hero-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-hero-text .skeleton {
    background: rgba(255,255,255,0.2) !important;
    background-image: linear-gradient(90deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.35) 40%, rgba(255,255,255,0.15) 80%) !important;
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* --- AI FEATURES TOGGLE --- */
html[data-ai-disabled="true"] .widget-credits,
html[data-ai-disabled="true"] .mobile-credits,
html[data-ai-disabled="true"] .studio-credits,
html[data-ai-disabled="true"] #geno-panel,
html[data-ai-disabled="true"] .ai-btn,
html[data-ai-disabled="true"] #card-ai,
html[data-ai-disabled="true"] #ai-panel { display: none !important; }

