:root {
    --primary-color: #FF006E;
    --secondary-color: #00FF88;
    --accent-color: #00D4FF;
    --gold-color: #FFD700;
    --pink-color: #FF0080;
    
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #888;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--pink-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    --gradient-bg: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    
    --shadow-glow: 0 0 20px rgba(255, 0, 110, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --border-glow: 1px solid rgba(255, 0, 110, 0.5);
}

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

body {
    font-family: 'Arial', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

header {
    position: sticky;
    top: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-glow);
    z-index: 100;
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.faq-link {
    color: var(--text-primary);
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.faq-link:hover {
    background: var(--gradient-secondary);
    transform: scale(1.1);
}

h1 {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 0, 110, 0.5);
}

.language-toggle {
    display: flex;
    align-items: center;
}

.lang-btn {
    background: var(--gradient-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    color: var(--bg-primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.page-section {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.page-section.active {
    display: block;
}

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

.welcome-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    border: var(--border-glow);
    text-align: center;
}

.welcome-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.primary-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 0, 110, 0.4);
}

.game-categories {
    margin-top: 2rem;
}

.game-categories h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
    border: var(--border-glow);
}

.category-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.games-header h2 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty-selector label {
    color: var(--text-secondary);
}

.difficulty-selector select {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.game-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
    border: var(--border-glow);
}

.game-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.game-card p {
    color: var(--text-secondary);
}

.game-area {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: var(--border-glow);
}

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

.back-btn {
    background: var(--gradient-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    color: var(--bg-primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: scale(1.05);
}

.game-info {
    text-align: right;
}

.game-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

#gameContent {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.game-results {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

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

.secondary-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.secondary-btn:hover {
    background: var(--secondary-color);
    color: var(--bg-primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

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

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 100px;
}

.result-item span:first-child {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-item label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

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

.progress-header h2 {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.export-controls {
    display: flex;
    gap: 0.5rem;
}

.export-btn {
    background: var(--gradient-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    color: var(--bg-primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: scale(1.05);
}

.progress-overview {
    margin-bottom: 2rem;
}

.overview-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: var(--border-glow);
}

.overview-card h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: var(--border-glow);
}

.chart-card h3 {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

.chart-card canvas {
    width: 100% !important;
    height: auto !important;
}

.achievements {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: var(--border-glow);
}

.achievements h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.achievement-item.unlocked {
    border: 1px solid var(--gold-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.achievement-item .achievement-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.achievement-item.unlocked .achievement-icon {
    color: var(--gold-color);
}

.achievement-item .achievement-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.achievement-item .achievement-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: var(--border-glow);
}

.avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.profile-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.profile-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.profile-stats {
    margin-bottom: 2rem;
}

.profile-stats h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.profile-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.profile-stat-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stat-card i {
    font-size: 2rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-settings {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: var(--border-glow);
}

.profile-settings h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.settings-list {
    margin-bottom: 2rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item:last-child {
    border-bottom: none;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background: var(--gradient-secondary);
}

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

.profile-actions {
    text-align: center;
}

.danger-btn {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
}

.faq-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    border: var(--border-glow);
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 1.5rem 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--secondary-color);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

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

.faq-answer {
    padding-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer:not([hidden]) {
    max-height: 200px;
    padding-bottom: 1.5rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-top: var(--border-glow);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 10px;
    min-width: 60px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--secondary-color);
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.footer-content a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Estilos para página de teste */
.test-instructions {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: var(--border-glow);
}

.test-instructions ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.test-instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.test-results {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: var(--border-glow);
}

.test-results h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

#testLog {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
}

#testLog div {
    margin-bottom: 0.25rem;
    padding: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Game-specific styles */
.memory-sequence-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.sequence-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.sequence-button {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sequence-button:hover {
    transform: scale(1.05);
}

.sequence-button.active {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
}

.math-challenge-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.math-question {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 2rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.math-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

.math-option {
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.math-option:hover {
    transform: scale(1.05);
    background: var(--gradient-secondary);
    color: var(--bg-primary);
}

.reflex-test-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.reflex-area {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.reflex-area.ready {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.pattern-match-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-width: 320px;
}

.pattern-cell {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pattern-cell:hover {
    transform: scale(1.05);
}

.pattern-cell.revealed {
    background: var(--gradient-secondary);
    color: var(--bg-primary);
}

.pattern-cell.matched {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    .category-grid,
    .game-selection {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .daily-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .games-header,
    .progress-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .game-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .game-info {
        text-align: center;
    }
    
    .result-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions .primary-btn,
    .result-actions .secondary-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stat-grid,
    .profile-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sequence-display {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .sequence-button {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .math-question {
        font-size: 2rem;
    }
    
    .reflex-area {
        width: 250px;
        height: 250px;
    }
    
    .pattern-grid {
        max-width: 280px;
    }
    
    .pattern-cell {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.5rem;
    }
    
    .welcome-card,
    .overview-card,
    .profile-settings,
    .faq-section {
        padding: 1.5rem;
    }
    
    .stat-grid,
    .profile-stat-cards {
        grid-template-columns: 1fr;
    }
    
    .export-controls {
        justify-content: center;
        width: 100%;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 0, 110, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for active elements */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 110, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 110, 0);
    }
}

/* Success animation */
.success-flash {
    animation: successFlash 0.5s ease;
}

@keyframes successFlash {
    0%, 100% { background: var(--bg-secondary); }
    50% { background: var(--secondary-color); }
}

/* Error animation */
.error-shake {
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
