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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a3d3e 0%, #164547 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.light-theme {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    color: #0a3d3e;
}

#app {
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Logo */
.logo-container {
    text-align: center;
    padding: 20px 20px 30px;
}

.logo {
    max-width: 400px;
    width: 90%;
    height: auto;
}

/* Main Action Buttons (Top 3) */
.main-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

/* Section Header */
.section-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #0a3d3e;
    text-align: center;
    padding: 15px;
    margin: 0 20px 20px;
    border-radius: 25px;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Resources Grid (3x3) */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

/* Button Styles */
.action-button,
.resource-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
    padding: 10px;
}

.action-button:active,
.resource-button:active {
    transform: scale(0.95);
}

.button-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4dd0e1 0%, #26c6da 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.4);
    transition: all 0.3s ease;
}

.action-button:hover .button-circle,
.resource-button:hover .button-circle {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(77, 208, 225, 0.6);
}

.button-circle i {
    font-size: 1.5rem;
    color: #0a3d3e;
}

.button-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
    max-width: 90px;
}

body.light-theme .button-label {
    color: #0a3d3e;
}

/* Special Button Styles */
.wavemaker-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
}

.nhs-button {
    background: linear-gradient(135deg, #005eb8 0%, #003d82 100%) !important;
}

.nhs-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
}

/* Screen Headers */
.screen-header {
    background: rgba(10, 61, 62, 0.9);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.light-theme .screen-header {
    background: rgba(224, 242, 241, 0.95);
    color: #0a3d3e;
}

.screen-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

.back-button {
    background: linear-gradient(135deg, #4dd0e1 0%, #26c6da 100%);
    border: none;
    color: #0a3d3e;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.back-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(77, 208, 225, 0.5);
}

.back-button:active {
    transform: scale(0.98);
}

/* Resource Content */
.resource-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.resource-content h1,
.resource-content h2,
.resource-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #4dd0e1;
}

body.light-theme .resource-content h1,
body.light-theme .resource-content h2,
body.light-theme .resource-content h3 {
    color: #00838f;
}

.resource-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.resource-content ul,
.resource-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.resource-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4dd0e1 0%, #26c6da 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-button {
    background: transparent;
    border: none;
    color: #0a3d3e;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 15px;
    transition: all 0.2s ease;
    border-radius: 10px;
}

.nav-button:hover {
    background: rgba(10, 61, 62, 0.1);
    transform: scale(1.1);
}

.nav-button:active {
    transform: scale(0.95);
}

.nav-button.active {
    background: rgba(10, 61, 62, 0.2);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 600px) {
    .main-actions,
    .resources-grid {
        gap: 10px;
        padding: 0 15px;
    }
    
    .button-circle {
        width: 60px;
        height: 60px;
    }
    
    .button-circle i {
        font-size: 1.3rem;
    }
    
    .button-label {
        font-size: 0.7rem;
    }
    
    .section-header {
        font-size: 1.2rem;
        margin: 0 15px 15px;
    }
    
    .logo {
        max-width: 300px;
    }
}

@media (max-width: 400px) {
    .button-circle {
        width: 55px;
        height: 55px;
    }
    
    .button-circle i {
        font-size: 1.1rem;
    }
    
    .button-label {
        font-size: 0.65rem;
    }
    
    .main-actions,
    .resources-grid {
        gap: 8px;
    }
}

/* Calm Space Instructions */
.calm-instructions {
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    color: #4dd0e1;
    font-style: italic;
}

/* Game UI */
.game-ui {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    background: rgba(10, 61, 62, 0.8);
    margin: 10px 20px;
    border-radius: 10px;
}

.game-stat {
    font-size: 1rem;
    font-weight: 600;
}

.game-stat span {
    color: #4dd0e1;
    font-weight: 700;
}

#start-game-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    background: linear-gradient(135deg, #4dd0e1 0%, #26c6da 100%);
    border: none;
    border-radius: 25px;
    color: #0a3d3e;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

#start-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(77, 208, 225, 0.5);
}

#start-game-btn:active {
    transform: scale(0.98);
}
