:root {
    --bg-color: #0f172a;
    --accent-1: #06b6d4; /* Cyan */
    --accent-2: #ec4899; /* Pink */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #e2e8f0;
    --coffee-color: #FFDD00;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out;
    pointer-events: none;
}
.orb-1 { width: 300px; height: 300px; background: var(--accent-1); top: -50px; left: -50px; opacity: 0.2; }
.orb-2 { width: 250px; height: 250px; background: var(--accent-2); bottom: -50px; right: -50px; opacity: 0.2; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 40px); }
}

/* --- SCREEN VISIBILITY LOGIC --- */
.screen {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MENU STYLES --- */
.menu-container {
    margin-top: 10vh;
    text-align: center;
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    max-width: 400px;
    width: 90%;
}
.menu-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-align: center;
}
.menu-btn:hover {
    background: var(--accent-1);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.menu-btn.secondary:hover {
    background: var(--accent-2);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

/* --- GAME STYLES --- */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}
header { text-align: center; margin-bottom: 2rem; z-index: 10; position: relative; }
h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}
.status { font-size: 1.2rem; font-weight: 300; min-height: 1.5em; transition: color 0.3s ease; }
.scoreboard {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    background: var(--glass-bg);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}
.score-box { text-align: center; min-width: 60px; }
.score-box span { font-size: 0.8rem; opacity: 0.7; }
.score-box strong { display: block; font-size: 1.5rem; font-family: 'Orbitron', sans-serif; }

/* --- AI TAUNT BUBBLE (RIGHT SIDE) --- */
.taunt-box {
    position: absolute;
    top: 75px; 
    right: -10px;
    left: auto;
    width: 180px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid var(--accent-2);
    color: var(--accent-2);
    padding: 12px 15px;
    border-radius: 15px;
    border-bottom-left-radius: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    line-height: 1.4;
    text-transform: uppercase;
    text-align: left;
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.taunt-box.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.taunt-box::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -10px;
    border-width: 0 10px 10px 0;
    border-style: solid;
    border-color: transparent var(--accent-2) transparent transparent;
}


/* --- BOARD --- */
.game-container { position: relative; z-index: 10; }
.board {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 15px;
    padding: 20px;
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.cell {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.cell:hover:not(.taken) {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.cell.taken { cursor: default; }
.cell::before, .cell::after {
    position: absolute; content: '';
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0; transform: scale(0.5);
}
.cell.x::before, .cell.x::after {
    width: 10px; height: 60px; background-color: var(--accent-1);
    border-radius: 5px; opacity: 1;
    transform: scale(1) rotate(45deg);
    box-shadow: 0 0 15px var(--accent-1);
}
.cell.x::after { transform: scale(1) rotate(-45deg); }
.cell.circle::before {
    width: 50px; height: 50px; background: transparent;
    border: 10px solid var(--accent-2); border-radius: 50%; opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 15px var(--accent-2), inset 0 0 15px var(--accent-2);
}
.cell.winner { background: rgba(255, 255, 255, 0.2); animation: pulse 1.5s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.controls { margin-top: 2rem; display: flex; gap: 1rem; z-index: 10; flex-wrap: wrap; justify-content: center; }
button {
    padding: 12px 24px; border: none; border-radius: 30px;
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px;
    background: var(--glass-bg); color: white; border: 1px solid var(--glass-border);
}
button:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

/* --- BUY ME A COFFEE WIDGET --- */
.bmc-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: floatBtn 3s ease-in-out infinite;
}
.bmc-btn:hover {
    background-color: var(--accent-2);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-2);
    border-color: var(--accent-2);
}
.bmc-icon {
    width: 20px;
    height: 20px;
    animation: wigule 2s infinite;
}
@keyframes floatBtn {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes wigule {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* SEO CONTENT */
.seo-content {
    max-width: 900px;
    margin: 4rem auto 2rem;
    padding: 3rem 2rem;
    background: rgba(15, 23, 42, 0.6);
    border-top: 2px solid var(--glass-border);
    z-index: 10;
}
.seo-content h2 { 
    color: var(--accent-1); 
    margin: 2rem 0 1rem; 
    font-family: 'Orbitron', sans-serif; 
    font-size: 1.8rem;
}
.seo-content h2:first-child { margin-top: 0; }
.seo-content p { 
    line-height: 1.8; 
    margin-bottom: 1.2rem; 
    opacity: 0.9; 
    font-size: 1.05rem;
}
.seo-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}
.seo-content li {
    margin-bottom: 0.8rem;
    opacity: 0.9;
}
.seo-content strong { color: var(--accent-2); }

.faq-section { margin-top: 2rem; }
.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--accent-1);
}
.faq-question {
    font-weight: 600;
    color: var(--accent-1);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.faq-answer { opacity: 0.85; line-height: 1.6; }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .cell { width: 75px; height: 75px; }
    h1 { font-size: 2rem; }
    .seo-content { padding: 2rem 1rem; }
    .seo-content h2 { font-size: 1.5rem; }
    .menu-container { padding: 2rem; width: 95%; }
    .bmc-btn { bottom: 10px; right: 10px; padding: 10px 15px; font-size: 0.8rem; }
    
    /* Mobile Taunt Center Logic */
    .taunt-box {
        top: 135px;
        right: 0;
        left: 50%;
        width: max-content;
        max-width: 90%;
        transform: translateX(-50%) scale(0.8);
        text-align: center;
        border-bottom-left-radius: 15px;
        border-radius: 50px;
    }
    .taunt-box.show {
        transform: translateX(-50%) scale(1);
    }
    .taunt-box::before {
        bottom: auto;
        top: -8px;
        left: 50%;
        margin-left: -5px;
        border-width: 0 8px 8px 8px;
        border-color: transparent transparent var(--accent-2) transparent;
    }
} /* <--- IMPORTANT: Mobile section ends here! */


/* =========================================
   PRO GAMER FOOTER STYLES (Global)
   ========================================= */

.site-footer {
    width: 100%;
    margin-top: 5rem;
    padding: 4rem 1rem;
    background: rgba(15, 23, 42, 0.95); /* Dark background */
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 1. Main Navigation Links */
.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-link {
    color: var(--text-color); /* Should be White/Light Grey */
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 5px 10px;
    position: relative;
}

/* Neon Hover Effect */
.footer-link:hover {
    opacity: 1;
    color: var(--accent-1); /* Cyan */
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
    transform: translateY(-2px);
}

/* Underline Animation */
.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-1);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-link:hover::after {
    width: 100%;
}

/* 2. Legal Section (Copyright & Small Links) */
.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #94a3b8; /* Muted Grey */
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.legal-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.legal-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--accent-2); /* Pink Hover */
    text-decoration: underline;
}

/* 3. Mobile Adjustments */
@media (max-width: 600px) {
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
}