/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation Bar */
.navbar {
    background-color: #386c85;
    color: white;
    padding: 15px 0;
    width: 100%;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links li a:hover {
    text-decoration: underline;
    color: white;
}

.hamburger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Main Section */
main {
    flex: 1;
    padding: 5px 5px 5px 5px;
    /* top, right, bottom, left */
    display: flex;
    justify-content: center;
}

.main-content {
    max-width: 800px;
    width: 100%;
    background: linear-gradient(to bottom right, #ffffff, #f9fbfc);
    padding: 50px 40px;
    margin: 15px auto;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e3e6ea;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.main-content:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

/* Typography */
.main-content h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #386c85;
    border-bottom: 2px solid #e3e6ea;
    padding-bottom: 10px;
}
.main-content h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #386c85;
    border-bottom: 2px solid #e3e6ea;
    padding-bottom: 10px;
}

.main-content h3 {
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #386c85;
}

.main-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.main-content ul,
.main-content ol {
    margin: 0 0 20px 0;
    padding-left: 1.2rem;
    list-style-position: inside;
    word-wrap: break-word;
}

.main-content li {
    margin-bottom: 10px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.main-content a {
    color: #386c85;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-content a:hover {
    color: #2b5468;
    text-decoration: none;
}

/* Footer */
footer {
    background-color: #386c85;
    color: white;
    text-align: center;
    padding: 20px 10px;
    font-size: 0.9rem;
}

.footer-links {
    margin-bottom: 5px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
    margin: 0 8px;
}

.footer-links a:hover {
    color: #e0e0e0;
    text-decoration: none;
}

.footer-links .divider {
    color: #ccc;
    font-weight: normal;
}

.puzzle-info {
    margin-top: 5px;
    padding: 16px 20px;
    background-color: #f1f4f7;
    border: 3px solid #386c85;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.puzzle-info h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #386c85;
    text-align: center;
}

.puzzle-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #444;
}


@media (max-width: 600px) {
    .puzzle-info {
        padding: 15px;
        font-size: 0.9rem;
    }

    .puzzle-info h3 {
        font-size: 1.15rem;
    }
}

/* Registration Form Styles */
.registration-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.registration-form label {
    font-weight: 600;
    color: #333;
}

.registration-form input {
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.registration-form input:focus {
    border-color: #386c85;
    box-shadow: 0 0 5px rgba(56, 108, 133, 0.3);
    outline: none;
}

.registration-form button {
    margin-top: 10px;
    padding: 12px;
    background-color: #386c85;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.registration-form button:hover {
    background-color: #2b5468;
}

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

.popup-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    width: 90%;
}

.popup-box h2 {
    margin-bottom: 15px;
    color: #386c85;
}

.popup-box button {
    margin-top: 15px;
    padding: 10px 18px;
    font-size: 1rem;
    background-color: #386c85;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.popup-box button:hover {
    background-color: #2b5468;
}

.hidden {
    display: none;
}

.game-controls {
    margin-top: 1rem;
    text-align: center;
}

#surrender-btn {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #cc4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#surrender-btn:hover {
    background-color: #a22;
}

.ad-container.top-banner {
    max-width: 100%;
    padding: 0.5rem 0;
}

.ad-container {
    max-width: 100%;
    padding: 1rem 0;
}

.ad-container.mid-article {
    margin: 2rem 0;
}

.ad-container.footer-banner {
    padding: 1rem 0;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .nav-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #386c85;
        margin-top: 10px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hamburger {
        display: block;
    }

    .main-content {
        padding: 30px 20px;
        margin: 20px 10px;
        border-radius: 12px;
    }

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

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

    .main-content p,
    .main-content li {
        font-size: 1rem;
    }

    .main-content ul,
    .main-content ol {
        padding-left: 1rem;
    }

    @media (max-width: 600px) {
    .registration-form {
        gap: 12px;
    }

    .registration-form input,
    .registration-form button {
        font-size: 1rem;
    }
}

}