/* ============================================
   Boxing Random - SEO Optimized Game Page
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --accent: #f4a261;
    --bg-dark: #0d1117;
    --bg-section: #161b22;
    --bg-alt: #1c2333;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --border: #30363d;
    --card-bg: #21262d;
    --max-width: 1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #e6b980;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Nav --- */
.site-header {
    background: var(--bg-section);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.logo:hover {
    color: var(--primary);
}

.logo-icon {
    font-size: 1.5rem;
}

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

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Game Section --- */
.game-section {
    padding: 40px 0 30px;
    background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-dark) 100%);
}

.game-section h1 {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
}

.game-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.game-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.game-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}

.game-overlay.hidden {
    display: none;
}

.play-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 48px;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.play-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(230, 57, 70, 0.6);
}

.game-actions {
    max-width: 800px;
    margin: 16px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.action-btn {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 20px;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

.rating-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Content Sections --- */
.content-section {
    padding: 60px 0;
}

.content-section.alt-bg {
    background: var(--bg-section);
}

.content-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

/* --- About Section (Two Column) --- */
.two-column {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

.text-content p {
    margin-bottom: 16px;
    color: var(--text);
    line-height: 1.8;
}

.feature-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.feature-box h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

/* --- Rules Grid --- */
.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.rule-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
}

.rule-card h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.rule-card p {
    margin-bottom: 12px;
    line-height: 1.8;
}

/* --- Controls Table --- */
.controls-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.controls-table th,
.controls-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.controls-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.player-badge.p1 {
    background: rgba(230, 57, 70, 0.2);
    color: var(--primary);
}

.player-badge.p2 {
    background: rgba(29, 53, 87, 0.4);
    color: #a8dadc;
}

kbd {
    display: inline-block;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.9rem;
    font-family: monospace;
    box-shadow: 0 2px 0 var(--border);
}

.controls-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

/* --- Tips Grid --- */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.tip-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.tip-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
}

.tip-card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text);
}

.tip-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* --- Unblocked Section --- */
.unblocked-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.cta-box {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px 28px;
    margin-top: 24px;
    text-align: center;
}

.cta-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.05rem;
}

.cta-link:hover {
    color: var(--accent);
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Related Games Grid --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
    display: block;
    color: var(--text);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    color: var(--text);
}

.game-card-thumb {
    font-size: 2.5rem;
    margin-bottom: 12px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-card h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.game-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* --- FAQ Section --- */
.faq-list {
    max-width: 800px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.faq-item summary:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding: 0 24px 18px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
    margin-bottom: 16px;
}

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

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Legal Pages --- */
.legal-page {
    max-width: 800px;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.legal-page h2 {
    font-size: 1.25rem;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text);
}

.legal-page h3 {
    font-size: 1.05rem;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--accent);
}

.legal-page p {
    margin-bottom: 14px;
    line-height: 1.8;
    color: var(--text-muted);
}

.legal-page ul,
.legal-page ol {
    margin: 12px 0 20px 24px;
    color: var(--text-muted);
    line-height: 1.8;
}

.legal-page li {
    margin-bottom: 6px;
}

/* --- Contact Form --- */
.contact-content {
    margin-top: 8px;
}

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-alt {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.contact-alt h2 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-section);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 20px;
        gap: 12px;
    }

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

    .mobile-menu-btn {
        display: block;
    }

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

    .content-section h2 {
        font-size: 1.3rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .game-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }
}
