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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Fixed Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
}

.nav-link:hover {
    color: #3498db;
    background-color: rgba(255,255,255,0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Game Section */
.game-section {
    margin-top: 70px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

.game-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.game-intro {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.game-frame-wrapper {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#game-frame {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
    overflow: hidden;
    scrolling: no;
}

.game-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.game-controls {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

.game-controls h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.game-controls ul {
    list-style: none;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.game-controls li {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

/* Content Section */
.content-section {
    background: #fff;
    padding: 60px 20px;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
}

.main-content {
    line-height: 1.8;
}

.main-content h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.main-content h3 {
    color: #34495e;
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.main-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: justify;
}

.main-content strong {
    color: #2c3e50;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 40px 20px 20px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #3498db;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 15px;
    color: #3498db;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

    .game-intro {
        font-size: 1rem;
    }

    #game-frame {
        height: 400px;
    }

    .game-controls {
        padding: 20px;
    }

    .main-content h2 {
        font-size: 2rem;
    }

    .main-content h3 {
        font-size: 1.5rem;
    }

    .main-content p {
        font-size: 1rem;
        text-align: left;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-logo h2 {
        font-size: 1.5rem;
    }

    .game-section {
        padding: 30px 15px;
    }

    .game-section h1 {
        font-size: 1.8rem;
    }

    #game-frame {
        height: 300px;
    }

    .game-controls ul {
        text-align: center;
    }

    .content-section {
        padding: 40px 15px;
    }

    .main-content h2 {
        font-size: 1.8rem;
    }

    .main-content h3 {
        font-size: 1.3rem;
    }

    .footer {
        padding: 30px 15px 15px;
    }
}

/* Animation and Effects */
.game-frame-wrapper {
    animation: fadeIn 1s ease-in;
}

/* Ad Container Styles */
.ad-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container .adsbygoogle {
    width: 100%;
    max-width: 100%;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.game-loading p:first-child::after {
    content: '';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}