/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #FF006E, #00FF88, #00D4FF);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 80px; /* Space for bottom nav */
}

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

/* Container Principal */
.game-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 20px;
}

/* Header */
.game-header {
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #FFD700, #FF006E);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.stat span:first-child {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #FF006E, #00FF88);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Área do Jogo */
.game-area {
    position: relative;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

#gameCanvas {
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    max-width: 100%;
    height: auto;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    padding: 30px;
}

.overlay h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #FFD700;
}

.overlay p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.final-stats {
    margin: 20px 0;
}

.final-stats p {
    font-size: 1.2rem;
    margin: 10px 0;
}

.final-stats span {
    color: #FFD700;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Botões */
.btn {
    background: linear-gradient(45deg, #FF006E, #00FF88);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

.btn.small {
    padding: 10px 15px;
    font-size: 1rem;
    margin: 0 5px;
}

/* Controles */
.controls {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Achievements */
.achievements-container {
    max-width: 100%;
    margin: 0 auto;
}

.achievement {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.achievement:hover {
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateX(5px);
}

.achievement.unlocked {
    border-color: #00FF88;
    background: rgba(0, 255, 136, 0.1);
}

.achievement-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #FF006E, #FFD700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
    color: white;
}

.achievement.unlocked .achievement-icon {
    background: linear-gradient(45deg, #00FF88, #00D4FF);
    animation: achievementGlow 2s ease-in-out infinite;
}

@keyframes achievementGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.8); }
}

.achievement-info {
    flex-grow: 1;
    text-align: left;
}

.achievement-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #FFD700;
}

.achievement-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.achievement-status {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
}

.achievement-status.locked {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

.achievement-status.unlocked {
    background: #00FF88;
    color: white;
    animation: unlockPulse 0.5s ease-in-out;
}

@keyframes unlockPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* FAQ */
.faq-container {
    max-width: 100%;
    margin: 0 auto;
}

.faq-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.1);
}

.faq-icon {
    font-size: 1.2rem;
    color: #FFD700;
    transition: transform 0.3s ease;
}

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

.faq-answer {
    padding: 0 20px 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    animation: slideDown 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

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

/* Settings */
.settings-container {
    max-width: 100%;
    margin: 0 auto;
}

.setting-group {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.setting-group h3 {
    margin-bottom: 20px;
    color: #FFD700;
    font-size: 1.2rem;
}

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

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

.setting-item label {
    font-weight: bold;
    flex-grow: 1;
}

.setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
}

.setting-item select option {
    background: #333;
    color: white;
}

.toggle-btn {
    background: linear-gradient(45deg, #00FF88, #00D4FF);
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.toggle-btn:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

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

.danger-btn {
    background: linear-gradient(45deg, #FF0080, #FF006E);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 128, 0.4);
}

.setting-description {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
    width: 100%;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 2px solid rgba(255, 215, 0, 0.5);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 10px;
    min-width: 60px;
}

.nav-item:hover {
    color: #FFD700;
    transform: translateY(-2px);
}

.nav-item.active {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

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

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

/* Footer */
footer {
    margin-top: 30px;
    text-align: center;
    opacity: 0.8;
}

footer a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #00FF88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.footer-links {
    margin-top: 10px;
    font-size: 0.9rem;
}

.footer-links a {
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
}

.footer-links a:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Responsivo */
@media (max-width: 600px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat {
        padding: 8px 15px;
    }
    
    .stat span:last-child {
        font-size: 1.2rem;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    
    .overlay {
        padding: 20px;
    }
    
    .overlay h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .achievement {
        padding: 15px;
    }
    
    .achievement-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .achievement-info h3 {
        font-size: 1rem;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
}

@media (max-width: 400px) {
    .game-header h1 {
        font-size: 1.8rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    #gameCanvas {
        max-width: 300px;
    }
    
    .achievement {
        flex-direction: column;
        text-align: center;
    }
    
    .achievement-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .achievement-info {
        text-align: center;
        margin-bottom: 10px;
    }
}
