/**
 * HTML & CSS Guide - Main Stylesheet
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* ===== CSS RESET & BASE ===== */
h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(14px, 2.5vw, 18px);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 60px;
    padding-bottom: 70px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 850px) {
    body {
        padding-bottom: 0;
    }
}

/* ===== FIXED HEADER ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.header-logo i {
    font-size: 1.5rem;
}

.app-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.header-logo h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

@media (max-width: 480px) {
    .header-logo h1 {
        font-size: 1rem;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

@media (min-width: 850px) {
    .desktop-nav {
        display: flex;
        gap: 8px;
    }
    
    .desktop-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 16px;
        color: var(--text-color);
        text-decoration: none;
        transition: all 0.2s ease;
        font-size: 0.95rem;
        white-space: nowrap;
}
    
    .desktop-nav .nav-link i {
        font-size: 1rem;
    }
    
    .desktop-nav .nav-link:hover {
        background: var(--primary-light);
        color: var(--primary-color);
    }
    
    .desktop-nav .nav-link.active {
        background: var(--primary-color);
        color: white;
    }
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 100px;
    border: none;
    background: var(--surface-hover);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* ===== BOTTOM NAVIGATION (Mobile Only) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 0px rgba(0,0,0,1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    min-width: 64px;
    min-height: 48px;
    border-radius: 16px;
}

.nav-item i {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: scale(1.15);
}

.nav-item-fab {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: -28px;
    color: white !important;
    box-shadow: var(--shadow-md);
}

.nav-item-fab i {
    font-size: 1.5rem;
}

.nav-item-fab span {
    display: none;
}

@media (min-width: 850px) {
    .bottom-nav {
        display: none !important;
    }
}


/* ===== DIDACTIC TIP (DICTIONARY) ===== */
.didactic-tip {
    background: linear-gradient(135deg, rgba(255, 189, 46, 0.1), rgba(255, 189, 46, 0.05));
    border-left: 4px solid #ffbd2e;
    padding: 20px;
    border-radius: 0 12px 12px 0;
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(255, 189, 46, 0.05);
}

.didactic-tip i {
    color: #ffbd2e;
    font-size: 1.5rem;
    margin-top: 2px;
}

.didactic-tip h4 {
    color: var(--text-color);
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.didactic-tip p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* ===== MAIN CONTENT ===== */
main {
    min-height: calc(100vh - 130px);
}

.container {
    padding: 16px;
    max-width: 100%;
}

@media (min-width: 850px) {
    .container {
        padding: 24px;
        max-width: 720px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* ===== SECTIONS ===== */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
    padding-top: 40px;
    scroll-margin-top: 90px;
}

.section.active {
    display: block;
}

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

.section-header {
    margin-bottom: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    letter-spacing: -0.02em;
}

.section-header h2 i {
    color: var(--primary-color);
    background: var(--surface-hover); /* Usando um verde neon suave se remeter ao GoAdopt ou cor primary genérica */
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

[data-theme="dark"] .section-header h2 i {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.6;
    margin: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    text-align: center;
    padding: 80px 0;
    margin-top: 0;
    margin-bottom: 48px;
    background-image: url('../img/hero_banner.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    opacity: 0.85;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===== QUICK STATS ===== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface-color);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.feature-card {
    background: var(--surface-color);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 24px;
    border-radius: 100px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-height: 48px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

/* ===== SEARCH ===== */
.search-container {
    margin: 0 auto 32px auto;
    max-width: 800px;
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border-radius: 100px;
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.search-box i {
    color: var(--text-muted);
    margin-right: 12px;
    font-size: 1.2rem;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

/* ===== FILTER TABS ===== */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    margin-top: 8px;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 100px;
    border: 2px solid var(--surface-hover);
    background: transparent;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px;
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-tab:hover:not(.active) {
    background: var(--surface-hover);
}

/* ===== IDE MODE (EDITOR INTERATIVO) ===== */
.editor-full-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.ide-workspace {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.5);
    border: 1px solid #333;
    overflow: hidden;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
}

.ide-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #252526;
    border-bottom: 1px solid #111;
    flex-wrap: wrap;
    gap: 12px;
}

.ide-toolbar-left, .ide-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ide-toolbar .btn-secondary {
    background: #333333;
    color: #cccccc;
    border: 1px solid #444;
}

.ide-toolbar .btn-secondary:hover {
    background: #444444;
    color: #ffffff;
}

.ide-toolbar .btn-primary {
    background: #007acc;
    color: white;
    border: 1px solid #007acc;
}

.ide-toolbar .btn-primary:hover {
    background: #0098ff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-height: auto;
    border-radius: 6px;
}

.btn-danger-hover:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 8px;
}

.blink {
    animation: blink 2s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.ide-split-layout {
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
}

@media (min-width: 992px) {
    .ide-split-layout {
        flex-direction: row;
        min-height: 600px;
    }
}

.ide-code-panels {
    display: flex;
    flex-direction: column;
    flex: 1;
    border-right: 1px solid #111;
    min-width: 0; /* Prevents flex blowout */
}

.ide-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 250px;
    border-bottom: 1px solid #111;
    background: #1e1e1e;
}
.ide-panel:last-child {
    border-bottom: none;
}

.ide-panel-header {
    background: #2d2d2d;
    color: #9cdcfe;
    padding: 6px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #111;
}
.ide-panel-header.css-header { color: #569cd6; }
.ide-panel-header i { margin-right: 8px; font-size: 0.9rem; }

.ide-code-editor {
    flex: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 16px;
    border: none;
    resize: none;
    outline: none;
}

/* Custom Scrollbar for Editors */
.ide-code-editor::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.ide-code-editor::-webkit-scrollbar-track {
    background: #1e1e1e;
}
.ide-code-editor::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
    border: 2px solid #1e1e1e;
}
.ide-code-editor::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

.ide-preview-panel {
    display: flex;
    flex-direction: column;
    background: white;
    flex: 1;
    min-height: 500px;
    min-width: 0;
}

.ide-browser-header {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 8px 16px;
    border-bottom: 1px solid #cbd5e1;
}

.mac-dots {
    display: flex;
    gap: 6px;
}
.mac-dots .dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.browser-url {
    flex: 1;
    margin: 0 16px;
    background: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    border: 1px solid #cbd5e1;
    font-family: monospace;
}

#refresh-preview {
    color: #64748b;
}

#preview-frame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* ===== CHALLENGES ===== */
.challenges-tabs,
.favorites-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--surface-hover);
}

.challenge-tab,
.fav-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    min-height: 48px;
}

.challenge-tab.active,
.fav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.challenge-card {
    background: var(--surface-color);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.challenge-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.challenge-difficulty {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

.challenge-difficulty.easy {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.challenge-difficulty.medium {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.challenge-difficulty.hard {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.challenge-description {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.challenge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-points {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 600;
}


/* ===== DIDACTIC ALERTS ===== */
.didactic-alert {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.didactic-alert.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.didactic-alert.info i { color: #3b82f6; }

.didactic-alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.didactic-alert.success i { color: #10b981; }

.didactic-alert i {
    font-size: 1.5rem;
    margin-top: 2px;
}

.didactic-alert h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.didactic-alert p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== QUIZ STYLES ===== */
.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    padding: 14px 20px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.quiz-option:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--primary-color);
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.quiz-option.correct {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #059669;
}

[data-theme="dark"] .quiz-option.correct { color: #34d399; }

.quiz-option.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

[data-theme="dark"] .quiz-option.incorrect { color: #f87171; }

.quiz-explanation {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.quiz-explanation p { margin: 0; }
.quiz-explanation p:first-child { margin-bottom: 8px; font-weight: 600; }

/* ===== ACHIEVEMENTS STYLES ===== */
.achievements-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.achievement-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255,189,46,0.1), rgba(255,189,46,0.2));
    border: 1px solid rgba(255,189,46,0.3);
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(255,189,46,0.1);
    transition: transform 0.3s ease;
}

.achievement-badge:hover {
    transform: translateY(-5px);
}

.achievement-badge i {
    font-size: 2.5rem;
    color: #ffbd2e;
    filter: drop-shadow(0 0 8px rgba(255,189,46,0.5));
}

.achievement-badge span {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* ===== ROADMAP ===== */
.roadmap-container {
    position: relative;
    padding: 24px 0;
}

.roadmap-item {
    position: relative;
    padding-left: 48px;
    margin-bottom: 32px;
}

.roadmap-item::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 32px;
    bottom: -32px;
    width: 2px;
    background: var(--surface-hover);
}

.roadmap-item:last-child::before {
    display: none;
}

.roadmap-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.roadmap-item.completed .roadmap-icon {
    background: #4CAF50;
}

.roadmap-content {
    background: var(--surface-color);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.roadmap-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.roadmap-description {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.roadmap-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--surface-hover);
    border-radius: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq-section {
    padding: 48px 0;
    background: var(--surface-color);
    margin-top: 48px;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 32px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-color);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    padding: 20px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    min-height: 48px;
}

.faq-question:hover {
    background: var(--surface-hover);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: 0 20px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.empty-state p {
    margin-bottom: 24px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 90px;
    left: 16px;
    right: 16px;
    margin: 0 auto;
    width: calc(100% - 32px);
    max-width: 400px;
    transform: translateY(100px);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 16px 20px;
    border-radius: 12px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    pointer-events: none; /* Garante que não bloqueie cliques embaixo dele */
    font-weight: 500;
    font-size: 0.95rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 850px) {
    .toast {
        bottom: 24px;
        left: 50%;
        right: auto;
        margin: 0;
        width: auto;
        min-width: 300px;
        transform: translateX(-50%) translateY(100px);
    }
    
    .toast.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== FOOTER ===== */
.app-footer {
    background: var(--surface-color);
    padding: 64px 24px 24px 24px;
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-brand {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo i {
    color: var(--primary-color);
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-links-group {
    display: flex;
    gap: 64px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 140px;
}

.footer-col h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    width: fit-content;
}

.footer-col a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links-group {
        gap: 40px;
        flex-direction: column;
    }
    
    .footer-bottom {
        padding-bottom: 80px; /* Space for mobile bottom nav */
    }
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-hover) 25%, var(--surface-color) 50%, var(--surface-hover) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 16px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 850px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.4s ease;
}

/* ===== PRINT STYLES ===== */
@media print {
    .app-header,
    .bottom-nav,
    .btn,
    .app-footer {
        display: none !important;
    }
    
    body {
        padding: 0;
    }
}


/* ===== RECENT ACTIVITY ===== */
.recent-activity {
    margin-top: 48px;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.recent-activity h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-color);
}

.recent-activity h3 i {
    color: var(--primary-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    background: var(--bg-color);
    border-radius: 16px;
    border: 1px dashed var(--border-color);
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.empty-state p {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.empty-state span {
    font-size: 0.95rem;
}

/* ===== DICTIONARY RESULTS (ACCORDION & RESPONSIVE) ===== */
.dictionary-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;  /* Centered column for optimal readability */
    margin: 0 auto;
}

.dict-item {
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid transparent;
}

.dict-item:hover {
    box-shadow: var(--shadow-md);
}

.dict-item.expanded {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.dict-item-summary {
    padding: 24px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.dict-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dict-item-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
}

.dict-item-badges {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dict-item-type {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 100px;
    font-weight: 700;
    text-transform: uppercase;
}
.dict-item-type.html { background: rgba(236, 72, 153, 0.15); color: #ec4899; }
.dict-item-type.css { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.btn-favorite {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.2s ease;
}
.btn-favorite.active { color: #FCD34D; }
.btn-favorite:hover { color: #F59E0B; }

.accordion-icon {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dict-item.expanded .accordion-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.dict-item-short-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.dict-item-details {
    display: none;
    padding: 0 24px 24px 24px;
}
.dict-item.expanded .dict-item-details {
    display: block;
    animation: slideDownFade 0.4s ease forwards;
}

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

.detail-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-color);
}
.detail-section h3 i { color: var(--primary-color); }

.detail-section pre {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.detail-section pre code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-color);
}

.category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}



/* ===== RECENT ACTIVITY ===== */
.recent-activity {
    margin-top: 48px;
    margin-bottom: 48px;
    width: 100%;
}
.recent-activity h3 {
    font-family: 'Space Grotesk', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-color);
}
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.activity-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface-color);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}
.activity-card:hover {
    transform: translateX(4px);
    background: var(--surface-hover);
}
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.activity-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0; /* Key for text ellipsis in flexbox */
}
.activity-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}
.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== BOTTOM NAV (MOBILE) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .bottom-nav {
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.2s;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item-fab {
    background: var(--primary-color);
    color: white !important;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -32px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    border: 4px solid var(--bg-color);
}

.nav-item-fab i {
    font-size: 1.5rem;
}

@media (min-width: 850px) {
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 849px) {
    body {
        padding-bottom: 90px; /* Space for bottom nav */
    }
}

.dict-item-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.dict-item-actions .btn {
    flex: 1;
    min-width: 140px;
    white-space: nowrap;
    justify-content: center;
}

@media (max-width: 480px) {
    .dict-item-actions {
        flex-direction: column;
    }
    .dict-item-actions .btn {
        width: 100%;
    }
}

/* ===== SNIPPETS SAVED ===== */
.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.snippet-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.snippet-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.snippet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.snippet-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
    border-radius: 50%;
}

.btn-icon:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.snippet-card pre {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin: 0;
}

.snippet-card pre code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.snippet-card .btn-secondary {
    width: 100%;
    justify-content: center;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 16px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .modal-content {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background: var(--surface-color);
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-color);
}

.modal-body {
    padding: 24px;
}
