/* Estilização geral e reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
            /* height: 100%; REMOVIDO */
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            color: #333;
            transition: all 0.3s ease;
            /* display: flex; REMOVIDO */
            /* flex-direction: column; REMOVIDO */
            /* overflow: hidden; REMOVIDO */
        }

        /* Modo escuro */
        body.dark-mode {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: #ecf0f1;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
            /* display: flex; REMOVIDO */
            /* flex-direction: column; REMOVIDO */
            /* flex-grow: 1; REMOVIDO */
            /* min-height: 0; REMOVIDO */
        }

        /* Header da Aplicação */
        .app-header {
            padding: 20px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            backdrop-filter: blur(5px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        body.dark-mode .app-header {
            background: rgba(44, 62, 80, 0.3);
        }

        .app-header h1 {
            color: white;
            font-size: clamp(1.6rem, 3.5vw, 2.2rem);
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
            margin: 0;
            text-align: center;
        }

        /* Controles do Header (Botões) */
        .header-controls {
            display: flex;
            gap: 15px;
            align-items: center;
            flex-wrap: wrap;
        }

        .theme-toggle,
        .export-btn {
            padding: 10px 20px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .theme-toggle:hover,
        .export-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        body.dark-mode .theme-toggle,
        body.dark-mode .export-btn {
            background: rgba(255, 255, 255, 0.1);
            color: #ecf0f1;
        }

        body.dark-mode .theme-toggle:hover,
        body.dark-mode .export-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Abas de navegação */
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .tab {
            padding: 12px 24px;
            background: rgba(255, 255, 255, 0.9);
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        .tab::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.5s;
        }

        .tab:hover::before {
            left: 100%;
        }

        .tab:hover {
            transform: translateY(-3px);
            background: white;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }

        .tab.active {
            background: #FFD700;
            color: #333;
            box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
            transform: translateY(-2px);
        }

        /* Área de conteúdo principal */
        .content-area {
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
            /* flex-grow: 1; REMOVIDO */
            overflow-y: auto;
            transition: all 0.3s ease;
            /* min-height: 0; REMOVIDO */
        }

        body.dark-mode .content-area {
            background: #2c3e50;
            color: #ecf0f1;
        }

        /* Scrollbar personalizada */
        .content-area::-webkit-scrollbar {
            width: 12px;
        }

        .content-area::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        body.dark-mode .content-area::-webkit-scrollbar-track {
            background: #34495e;
        }

        .content-area::-webkit-scrollbar-thumb {
            background: linear-gradient(45deg, #667eea, #764ba2);
            border-radius: 10px;
        }

        /* Esconde seções inativas */
        .quiz-container,
        .rules-section {
            display: none;
        }

        .quiz-container.active,
        .rules-section.active {
            display: block;
        }

        /* Seletor de categorias do Quiz */
        .category-selector {
            margin-bottom: 30px;
            padding: 25px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 15px;
            text-align: center;
            box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        body.dark-mode .category-selector {
            background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        }

        .category-selector h3 {
            margin-bottom: 20px;
            color: #495057;
        }

        body.dark-mode .category-selector h3 {
            color: #ecf0f1;
        }

        .category-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .category-btn {
            padding: 15px 20px;
            background: white;
            border: 3px solid #dee2e6;
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.4s ease;
            font-weight: 600;
            font-size: 0.95rem;
            position: relative;
            overflow: hidden;
        }

        body.dark-mode .category-btn {
            background: #4a637a;
            color: #ecf0f1;
            border-color: #5d7a96;
        }

        .category-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transition: left 0.6s;
        }

        .category-btn:hover::before {
            left: 100%;
        }

        .category-btn:hover {
            background: #f8f9fa;
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .category-btn:hover {
            background: #5d7a96;
        }

        .category-btn.selected {
            background: linear-gradient(135deg, #007bff, #0056b3);
            color: white;
            border-color: #0056b3;
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3);
        }

        .category-btn.all-selected {
            background: linear-gradient(135deg, #28a745, #1e7e34);
            color: white;
            border-color: #1e7e34;
            box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
        }

        body.dark-mode .category-btn.selected {
            background: linear-gradient(135deg, #FFD700, #fca503);
            color: #333;
            border-color: #fca503;
            box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
        }

        body.dark-mode .category-btn.all-selected {
            background: linear-gradient(135deg, #34d399, #10b981);
            color: white;
            border-color: #059669;
            box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
        }

        .quiz-mode-selector,
        .difficulty-selector {
            margin: 20px 0;
            padding: 20px;
            background: rgba(233, 236, 239, 0.5);
            border-radius: 12px;
            backdrop-filter: blur(5px);
        }

        body.dark-mode .quiz-mode-selector,
        body.dark-mode .difficulty-selector {
            background: rgba(44, 62, 80, 0.5);
        }

        .quiz-mode-selector h4,
        .difficulty-selector h4 {
            margin-bottom: 15px;
            color: #495057;
        }

        body.dark-mode .quiz-mode-selector h4,
        body.dark-mode .difficulty-selector h4 {
            color: #ecf0f1;
        }

        .quiz-mode-selector label,
        .difficulty-selector label {
            margin: 0 15px;
            font-weight: 600;
            cursor: pointer;
            padding: 8px 15px;
            border-radius: 20px;
            transition: all 0.3s ease;
            display: inline-block;
        }

        .quiz-mode-selector label:hover,
        .difficulty-selector label:hover {
            background: rgba(0, 123, 255, 0.1);
        }

        .difficulty-selector label:has(input:checked),
        .quiz-mode-selector label:has(input:checked) {
            background: #dde6ff;
            color: #0040b3;
        }

        body.dark-mode .difficulty-selector label:has(input:checked),
        body.dark-mode .quiz-mode-selector label:has(input:checked) {
            background: #007bff;
            color: white;
        }

        .start-quiz-btn {
            display: inline-block;
            margin: 20px auto 0;
            padding: 18px 45px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 1.3rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
        }

        .start-quiz-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.6s;
        }

        .start-quiz-btn:hover::before {
            left: 100%;
        }

        .start-quiz-btn:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
        }

        /* Área do Quiz Ativo */
        .quiz-area {
            display: none;
        }

        .quiz-area.active {
            display: block;
        }

        .stats-bar {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 25px;
        }

        .stat-card {
            padding: 20px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 15px;
            text-align: center;
            transition: all 0.3s ease;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        body.dark-mode .stat-card {
            background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .stat-card h4 {
            color: #666;
            font-size: 0.95rem;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        body.dark-mode .stat-card h4 {
            color: #bdc3c7;
        }

        .stat-card .value {
            font-size: 2rem;
            font-weight: bold;
            background: linear-gradient(45deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .progress-bar {
            width: 100%;
            height: 12px;
            background: #e9ecef;
            border-radius: 6px;
            overflow: hidden;
            margin: 15px 0 25px;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .progress-bar {
            background: #34495e;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #28a745, #20c997);
            transition: width 0.5s ease-in-out;
            border-radius: 6px;
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        .compound-display {
            text-align: center;
            font-size: clamp(2rem, 5vw, 3.5rem);
            margin: 25px 0;
            padding: 40px;
            color: white;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            position: relative;
            transition: all 0.5s ease;
            word-wrap: break-word;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .compound-display.name-mode {
            font-size: clamp(1.5rem, 4vw, 2.5rem);
        }

        .compound-type-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            padding: 8px 20px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            font-size: 0.9rem;
            font-weight: bold;
            backdrop-filter: blur(10px);
        }

        /* Estilo para subscritos e sobrescritos */
        .compound-display sub,
        .compound-display sup,
        .option sub,
        .option sup {
            font-size: 0.65em;
            line-height: 0;
        }

        .options {
            display: grid;
            gap: 15px;
            margin: 25px 0;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        }

        .option {
            padding: 20px;
            background: #f8f9fa;
            border: 3px solid #e9ecef;
            border-radius: 15px;
            cursor: pointer;
            transition: all 0.4s ease;
            font-size: 1.1rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        body.dark-mode .option {
            background: #4a637a;
            border-color: #5d7a96;
            color: #ecf0f1;
        }

        .option::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
            transition: left 0.6s;
        }

        .option:not(.correct):not(.incorrect):hover::before {
            left: 100%;
        }

        .option:not(.correct):not(.incorrect):hover {
            background: #e9ecef;
            transform: translateX(8px) translateY(-2px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
            border-color: #007bff;
        }

        body.dark-mode .option:not(.correct):not(.incorrect):hover {
            background: #5d7a96;
            border-color: #3498db;
        }

        .option.correct {
            background: linear-gradient(135deg, #d4edda, #c3e6cb);
            border-color: #28a745;
            color: #155724;
            animation: correctPulse 0.6s ease;
            box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
        }

        .option.incorrect {
            background: linear-gradient(135deg, #f8d7da, #f1b0b7);
            border-color: #dc3545;
            color: #721c24;
            animation: incorrectShake 0.6s ease;
            box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
        }

        body.dark-mode .option.correct {
            background: linear-gradient(135deg, #10b981, #059669);
            border-color: #34d399;
            color: white;
        }

        body.dark-mode .option.incorrect {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            border-color: #f87171;
            color: white;
        }

        @keyframes correctPulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        @keyframes incorrectShake {

            0%,
            100% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-10px);
            }

            75% {
                transform: translateX(10px);
            }
        }

        /* Bloco de Explicação */
        .explanation {
            margin-top: 25px;
            padding: 25px;
            background: linear-gradient(135deg, #e7f3ff, #cce7ff);
            border-left: 5px solid #0066cc;
            border-radius: 10px;
            display: none;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 102, 204, 0.1);
        }

        body.dark-mode .explanation {
            background: #34495e;
            border-left-color: #3498db;
        }

        .explanation.show {
            display: block;
            animation: slideIn 0.5s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .next-btn {
            display: none;
            margin: 25px auto;
            padding: 15px 35px;
            background: linear-gradient(135deg, #28a745, #20c997);
            color: white;
            border: none;
            border-radius: 25px;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
        }

        .next-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
        }

        .next-btn.show {
            display: block;
            animation: fadeInUp 0.5s ease;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .reset-btn {
            margin: 15px auto;
            padding: 12px 30px;
            background: linear-gradient(135deg, #6c757d, #5a6268);
            color: white;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            display: block;
            transition: all 0.3s ease;
            box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
        }

        .reset-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
        }

        /* Estilos para seções de regras e tabelas */
        .rule-card {
            margin-bottom: 30px;
            padding: 25px;
            background: linear-gradient(135deg, #fdfdff, #f8f9fa);
            border-radius: 15px;
            border-left: 5px solid #007bff;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
        }

        body.dark-mode .rule-card {
            background: #34495e;
            border-left-color: #3498db;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        .rule-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        #analysis-section .rule-card {
            border-left-color: #ffc107;
        }

        body.dark-mode #analysis-section .rule-card {
            border-left-color: #f1c40f;
        }

        .rule-card h3 {
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            font-size: 1.4rem;
        }

        .rule-card h4 {
            color: #495057;
            margin-top: 25px;
            margin-bottom: 15px;
            border-bottom: 2px solid #e9ecef;
            padding-bottom: 8px;
            font-size: 1.2rem;
        }

        body.dark-mode .rule-card h4 {
            color: #ecf0f1;
            border-bottom-color: #5d7a96;
        }

        .rule-card table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
        }

        .rule-card th,
        .rule-card td {
            padding: 15px;
            border: 1px solid #dee2e6;
            text-align: left;
            vertical-align: middle;
            transition: all 0.3s ease;
        }

        body.dark-mode .rule-card td,
        body.dark-mode .rule-card th {
            border-color: #5d7a96;
        }

        .rule-card th {
            background: linear-gradient(135deg, #007bff, #0056b3);
            color: white;
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .rule-card tr:nth-child(even) {
            background: rgba(248, 249, 250, 0.5);
        }

        body.dark-mode .rule-card tr:nth-child(even) {
            background: rgba(44, 62, 80, 0.5);
        }

        .rule-card tr:hover {
            background: rgba(0, 123, 255, 0.05);
            transform: scale(1.01);
        }

        body.dark-mode .rule-card tr:hover {
            background: rgba(52, 152, 219, 0.1);
        }

        .rule-card td:first-child {
            font-weight: bold;
        }

        /* Correção para tabelas com estilos de fundo no modo escuro */
        body.dark-mode .example-box table tr[style] {
            background-color: transparent !important;
        }

        .example-box {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            padding: 20px;
            margin: 15px 0;
            border-radius: 12px;
            border: 1px solid #dee2e6;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        body.dark-mode .example-box {
            background: #34495e;
            border-color: #5d7a96;
        }

        /* Cores para tipos de compostos */
        .acid {
            color: #28a745;
            font-weight: bold;
        }

        .base {
            color: #6f42c1;
            font-weight: bold;
        }

        .oxide {
            color: #fd7e14;
            font-weight: bold;
        }

        .salt {
            color: #17a2b8;
            font-weight: bold;
        }

        .cation {
            color: #dc3545;
            font-weight: bold;
        }

        .anion {
            color: #007bff;
            font-weight: bold;
        }

        .difficulty-indicator {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: bold;
            margin-left: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .difficulty-facil {
            background: #d4edda;
            color: #155724;
        }

        .difficulty-medio {
            background: #fff3cd;
            color: #856404;
        }

        .difficulty-dificil {
            background: #f8d7da;
            color: #721c24;
        }

        body.dark-mode .difficulty-facil {
            background: #10b981;
            color: white;
        }

        body.dark-mode .difficulty-medio {
            background: #f59e0b;
            color: white;
        }

        body.dark-mode .difficulty-dificil {
            background: #ef4444;
            color: white;
        }

        .memorization-tips {
            background: linear-gradient(135deg, #fff9e6, #fff3cd);
            border-left: 5px solid #ffc107;
            padding: 20px;
            margin: 20px 0;
            border-radius: 10px;
            box-shadow: 0 3px 10px rgba(255, 193, 7, 0.2);
        }

        body.dark-mode .memorization-tips {
            background: #4a637a;
            border-left-color: #f1c40f;
        }

        /* Botão de rolagem para o topo */
        .scroll-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: linear-gradient(135deg, #007bff, #0056b3);
            color: white;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(0, 123, 255, 0.4);
            opacity: 0;
            transition: all 0.4s ease;
            transform: translateY(20px);
            font-size: 1.5rem;
            z-index: 1000;
        }

        .scroll-top.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .scroll-top:hover {
            background: linear-gradient(135deg, #0056b3, #004085);
            transform: translateY(-3px);
            box-shadow: 0 8px 30px rgba(0, 123, 255, 0.6);
        }

        #analysis-results ul {
            list-style-type: none;
            padding-left: 0;
        }

        #analysis-results li {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 10px;
            font-weight: 500;
            border-left: 4px solid #ffc107;
            transition: all 0.3s ease;
        }

        body.dark-mode #analysis-results li {
            background: #34495e;
            border-left-color: #f1c40f;
        }

        #analysis-results li:hover {
            transform: translateX(5px);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        }

        /* Flashcards */
        .flashcard-container {
            margin: 20px 0;
            text-align: center;
        }

        .flashcard {
            width: 100%;
            max-width: 100%; /* Ajustado para mobile */
            height: 250px;
            margin: 0 auto;
            perspective: 1000px;
            cursor: pointer;
        }

        .flashcard-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: center;
            transition: transform 0.6s;
            transform-style: preserve-3d;
        }

        .flashcard.flipped .flashcard-inner {
            transform: rotateY(180deg);
        }

        .flashcard-front,
        .flashcard-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            font-size: 1.5rem;
            font-weight: bold;
            padding: 10px;
        }

        .flashcard-front {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
        }

        .flashcard-back {
            background: linear-gradient(135deg, #f093fb, #f5576c);
            color: white;
            transform: rotateY(180deg);
        }

        /* Responsividade */
        @media (max-width: 768px) {
            .container {
                padding: 0 10px;
            }

            .app-header {
                justify-content: center;
                text-align: center;
            }

            .app-header h1 {
                width: 100%;
            }

            .category-options {
                grid-template-columns: 1fr;
            }

            .options {
                grid-template-columns: 1fr;
            }

            .stats-bar {
                grid-template-columns: 1fr;
            }

            .rule-card table {
                font-size: 0.9rem;
            }

            .rule-card th,
            .rule-card td {
                padding: 10px;
            }
        }

        /* Animações de entrada */
        .fade-in {
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* Estilos do novo rodapé */
        .site-footer {
            text-align: center;
            padding: 30px 20px;
            margin-top: 40px;
            color: rgba(255, 255, 255, 0.85);
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .site-footer img {
            max-height: 110px;
            width: auto;
            border-radius: 50%;
            margin-bottom: 20px;
            background: rgba(255, 255, 255, 0.1);
            padding: 5px;
        }

        .site-footer .credits strong {
            font-size: 1.3rem;
            font-weight: 600;
            display: block;
            margin-bottom: 8px;
            color: white;
        }

        .site-footer .credits span {
            font-size: 1rem;
            line-height: 1.6;
            display: block;
        }