/* Main Styles for Dust Storm Website */

/* Global Styles */
:root {
    --primary-color: #e67e22;
    --secondary-color: #3498db;
    --accent-color: #f1c40f;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --text-color: #333;
    --bg-color: #fff;
    --section-padding: 80px 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

.section-padding {
    padding: var(--section-padding);
}

.bg-light {
    background-color: #f8f9fa;
}

.bg-warning-light {
    background-color: #fff9e6;
}

/* Navigation */
.navbar {
    background-color: rgba(141, 85, 36, 0.95);
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(.4,0,.2,1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.navbar.show-navbar {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--light-color);
}

.nav-link {
    color: var(--light-color) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #f1c40f !important;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/game.png');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-section .btn {
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* What Are Dust Storms Section */
.storm-type-toggle .btn {
    margin-right: 10px;
}

.storm-description {
    padding: 15px;
    border-radius: 5px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
}

/* Formation Section */
.formation-step {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-content h4 {
    margin-bottom: 5px;
}

/* Global Distribution Section */
.global-map-container {
    position: relative;
    margin-bottom: 30px;
}

.fact-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
}

/* Impacts Section */
.impact-category {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.impact-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.impact-item {
    margin-bottom: 20px;
}

.impact-item h4 {
    color: var(--dark-color);
    font-size: 1.2rem;
}

/* Historical Events Section */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-container:before {
    content: '';
    position: absolute;
    top: 0;
    left: 120px;
    height: 100%;
    width: 4px;
    background: #eee;
}

.timeline-event {
    position: relative;
    margin-bottom: 50px;
    display: flex;
}

.event-year {
    width: 100px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: right;
    padding-right: 30px;
    flex-shrink: 0;
}

.event-content {
    flex-grow: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-left: 40px;
}

.event-content:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 118px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
}

.major-event .event-content:before {
    background: var(--danger-color);
    width: 20px;
    height: 20px;
    left: 116px;
}

.event-image {
    margin-top: 15px;
}

.caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Safety Guide Section */
.safety-card {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.safety-card h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.motorist-safety h3 {
    color: var(--danger-color);
}

.general-safety h3 {
    color: var(--primary-color);
}

.checklist-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.checklist-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 5px;
}

.safety-warning {
    background-color: #ffebee;
    border-left: 4px solid var(--danger-color);
    padding: 15px;
    border-radius: 4px;
}

.vulnerable-groups {
    background-color: #e8f5e9;
    border-left: 4px solid var(--success-color);
    padding: 15px;
    border-radius: 4px;
}

/* Warning Systems Section */
.warning-example {
    background-color: #ffebee;
    border-left: 4px solid var(--danger-color);
}

/* International Response Section */
.global-initiatives {
    margin-bottom: 40px;
}

.initiative-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.research-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    height: 100%;
}

/* Resources Section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.resource-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.resource-item h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.resource-item p {
    margin-bottom: 20px;
    min-height: 50px;
}

/* Footer */
.footer-section {
    background-color: #8d5524;
    color: var(--light-color);
    padding: 40px 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: rgba(44, 62, 80, 0.95);
        padding: 15px;
        border-radius: 5px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section h2 {
        font-size: 1.5rem;
    }

    .timeline-container:before {
        left: 60px;
    }

    .event-year {
        width: 50px;
        padding-right: 20px;
    }

    .event-content {
        margin-left: 30px;
    }

    .event-content:before {
        left: 58px;
    }

    .major-event .event-content:before {
        left: 56px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero-section {
        min-height: 500px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section h2 {
        font-size: 1.2rem;
    }

    .timeline-container:before {
        display: none;
    }

    .timeline-event {
        flex-direction: column;
    }

    .event-year {
        width: 100%;
        text-align: left;
        padding-right: 0;
        margin-bottom: 10px;
    }

    .event-content {
        margin-left: 0;
    }

    .event-content:before {
        display: none;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 1s ease-in-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
    animation: slideInRight 1s ease-in-out;
}

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

/* Game Styles */
.screen {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: #f5f5f5;
    z-index: 100;
    padding: 20px;
    text-align: center;
    overflow: visible;
}

.hidden {
    display: none;
}

#start-screen h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#start-screen p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #d35400;
}

.instructions {
    margin-top: 2rem;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    max-width: 500px;
}

#game-screen {
    padding: 0;
    overflow: hidden;
}

#game-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 5px;
    z-index: 10;
}

#game-stats div {
    margin-bottom: 5px;
    font-weight: bold;
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

#joystick-area {
    width: 150px;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

#end-screen h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

#stats-summary {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#knowledge-display {
    max-width: 600px;
    margin: 0 auto 20px;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

#knowledge-list p {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.popup h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.popup-content p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.popup .btn {
    display: inline-block;
    min-width: 100px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup .btn:hover {
    background-color: #d35400;
    transform: scale(1.05);
}

.popup .btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    #start-screen h1 {
        font-size: 2rem;
    }

    .instructions {
        padding: 10px;
    }

    #end-screen h1 {
        font-size: 1.8rem;
    }
}
