:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --holographic: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff, #06ffa5, #ffbe0b);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body.dark-theme {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --text-light: #cccccc;
    --primary-color: #333333;
    --secondary-color: #4CAF50;
    --background: #1a1a1a;
    --card-background: #2d2d2d;
    --card-border: #404040;
    --modal-background: #2d2d2d;
    --nav-background: #2d2d2d;
    --nav-border: #404040;
    --button-background: #404040;
    --button-text: #ffffff;
    --input-background: #2d2d2d;
    --input-border: #404040;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --success-color: #4CAF50;
    --gradient-primary: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    --gradient-secondary: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    --gradient-success: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

/* Estilos específicos para modo escuro */
body.dark-theme .card-back {
    background: #404040;
    color: #ffffff;
}

body.dark-theme .nav-item {
    color: #cccccc;
}

body.dark-theme .nav-item:hover,
body.dark-theme .nav-item.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

/* Corrigir gradientes no modo escuro */
body.dark-theme .difficulty-btn::before {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

body.dark-theme .mode-option input[type="radio"]:checked + .mode-label {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

body.dark-theme .start-game-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

body.dark-theme .pause-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

body.dark-theme .modal-btn.primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

body.dark-theme .setting-item {
    border-bottom: 1px solid #404040;
}

body.dark-theme .setting-group h3 {
    border-bottom: 2px solid #404040;
}

body.dark-theme .difficulty-records h3 {
    border-bottom: 2px solid #404040;
}

body.dark-theme .faq-item {
    border-bottom: 1px solid #404040;
}

body.dark-theme .toggle-slider {
    background-color: #404040;
}

body.dark-theme .toggle-slider:before {
    background-color: #ffffff;
}

body.dark-theme input:checked + .toggle-slider {
    background: #4CAF50;
}

/* Melhorar legibilidade de textos no modo escuro */
body.dark-theme .game-logo h2 {
    color: #4CAF50;
    -webkit-text-fill-color: #4CAF50;
}

body.dark-theme .game-logo p {
    color: #cccccc;
}

body.dark-theme .difficulty-selection h3,
body.dark-theme .game-modes h3 {
    color: #ffffff;
}

body.dark-theme .difficulty-btn span,
body.dark-theme .difficulty-btn small {
    color: #ffffff;
}

body.dark-theme .mode-label {
    color: #ffffff;
}

body.dark-theme .records-header h2 {
    color: #4CAF50;
    -webkit-text-fill-color: #4CAF50;
}

body.dark-theme .settings-header h2 {
    color: #4CAF50;
    -webkit-text-fill-color: #4CAF50;
}

body.dark-theme .faq-section h2 {
    color: #4CAF50;
    -webkit-text-fill-color: #4CAF50;
}

body.dark-theme .stat-item {
    color: #ffffff;
}

body.dark-theme .record-stat {
    color: #ffffff;
}

body.dark-theme .stat-card {
    background: #404040;
    color: #ffffff;
}

body.dark-theme .about-info {
    color: #cccccc;
}

body.classic-theme {
    --gradient-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --gradient-secondary: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --holographic: var(--gradient-primary);
}

.app-header {
    background: var(--holographic);
    background-size: 300% 300%;
    animation: holographicShift 6s ease-in-out infinite;
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

@keyframes holographicShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.header-content h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Garantir que o texto do header seja sempre legível */
body.dark-theme .header-content h1 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.language-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.main-content {
    padding-top: 80px;
    padding-bottom: 120px;
    min-height: 100vh;
}

.screen {
    display: none;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

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

.welcome-section {
    text-align: center;
    padding: 2rem 0;
}

.game-logo {
    margin-bottom: 3rem;
}

.game-logo i {
    font-size: 4rem;
    background: var(--holographic);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: holographicShift 6s ease-in-out infinite;
    margin-bottom: 1rem;
    display: block;
}

.game-logo h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-logo p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.difficulty-selection, .game-modes {
    margin-bottom: 3rem;
}

.difficulty-selection h3, .game-modes h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.difficulty-btn {
    background: var(--card-background, white);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.difficulty-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--holographic);
    background-size: 300% 300%;
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: holographicShift 6s ease-in-out infinite;
}

.difficulty-btn:hover::before,
.difficulty-btn.selected::before {
    opacity: 1;
}

.difficulty-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.difficulty-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--secondary-color);
}

.difficulty-btn span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.difficulty-btn small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.mode-selection {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-option {
    cursor: pointer;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-background, white);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-option input[type="radio"]:checked + .mode-label {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
}

.mode-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.start-game-btn {
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.start-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-background, white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.game-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.stat-item i {
    color: var(--secondary-color);
}

.pause-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.pause-btn:hover {
    transform: scale(1.1);
}

.game-board {
    display: grid;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
}

.game-board.size-4 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 400px;
    margin: 0 auto 2rem;
}

.game-board.size-6 {
    grid-template-columns: repeat(6, 1fr);
    max-width: 500px;
    margin: 0 auto 2rem;
}

.game-board.size-8 {
    grid-template-columns: repeat(8, 1fr);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.card {
    aspect-ratio: 1;
    background: var(--card-background, white);
    border-radius: var(--border-radius);
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    box-shadow: var(--shadow);
    min-height: 60px;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.matched {
    transform: rotateY(180deg);
    opacity: 0.8;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    animation: matchedPulse 2s ease-in-out infinite;
}

@keyframes matchedPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
        transform: rotateY(180deg) scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
        transform: rotateY(180deg) scale(1.05);
    }
}

@keyframes matchSuccessSlide {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.5); 
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.1); 
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-front {
    background: var(--holographic);
    background-size: 300% 300%;
    animation: holographicShift 6s ease-in-out infinite;
    color: white;
    transform: rotateY(180deg);
}

.card.matched .card-front {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    animation: none;
    position: relative;
}

.card.matched .card-front::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    color: #4CAF50;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card-back {
    background: var(--card-background, linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%));
    color: var(--text-light);
}

.card:hover:not(.flipped):not(.matched) {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.control-btn {
    background: var(--button-background, white);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--button-text, var(--primary-color));
}

.control-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

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

.clear-records-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-records-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.difficulty-records {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.difficulty-records h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 0.5rem;
}

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

.record-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-stat i {
    color: var(--secondary-color);
}

.stats-summary {
    background: var(--card-background, white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

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

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

.stat-card {
    background: var(--background-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

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

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

.setting-group {
    background: var(--card-background, white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.setting-group h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--background-color);
}

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

.setting-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.setting-item i {
    color: var(--secondary-color);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 25px;
    cursor: pointer;
}

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

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

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

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

input:checked + .toggle-slider:before {
    transform: translateX(25px);
}

.setting-select {
    background: var(--input-background, var(--background-color));
    border: 1px solid var(--input-border, #ddd);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    min-width: 150px;
    color: var(--text-color);
}

.about-info {
    color: var(--text-light);
    line-height: 1.8;
}

.about-info a {
    color: var(--secondary-color);
    text-decoration: none;
}

.about-info a:hover {
    text-decoration: underline;
}

.faq-section {
    background: var(--card-background, white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 1rem;
    box-shadow: var(--shadow);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.faq-item {
    border-bottom: 1px solid var(--background-color);
    margin-bottom: 1rem;
}

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

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

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

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

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

.faq-answer.expanded {
    max-height: 200px;
    padding: 1rem 0 1.5rem 0;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-background, white);
    border-top: 1px solid var(--nav-border, #e1e8ed);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

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

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

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

.nav-item:hover,
.nav-item.active {
    color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--modal-background, white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.final-stats {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.final-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
}

.final-stat i {
    color: var(--secondary-color);
}

.new-record-badge {
    background: var(--gradient-success);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.modal-actions {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

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

.modal-btn.secondary {
    background: var(--card-background, white);
    color: var(--text-color, var(--primary-color));
    border: 2px solid var(--primary-color);
}

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

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

footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.2rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat-item {
        font-size: 0.9rem;
    }
    
    .difficulty-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .mode-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .game-board.size-6 {
        max-width: 350px;
    }
    
    .game-board.size-8 {
        max-width: 320px;
    }
    
    .card {
        min-height: 45px;
    }
    
    .card-front,
    .card-back {
        font-size: 1.2rem;
    }
    
    .records-header {
        flex-direction: column;
        text-align: center;
    }
    
    .record-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .faq-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .game-board.size-8 {
        grid-template-columns: repeat(6, 1fr);
        max-width: 300px;
    }
    
    .card {
        min-height: 35px;
    }
    
    .card-front,
    .card-back {
        font-size: 1rem;
    }
    
    .difficulty-btn {
        padding: 1rem;
    }
    
    .difficulty-btn i {
        font-size: 1.5rem;
    }
}

.no-animations * {
    animation: none !important;
    transition: none !important;
}

.card.shake {
    animation: shake 0.5s ease-in-out;
}

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

.card.bounce {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
