/* RESET + BASE */
body {
    margin: 0;
    font-family: Arial, sans-serif;

    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;

    transition: 0.4s;
}

/* MAIN LAYOUT */
.main-container {
    display: flex;
    height: 100vh;
}

/* GAME SECTION */
.game-section {
    flex: 3;
    text-align: center;
    position: relative;
}


/* PLAYER INPUTS */
.players {
    margin-top: 10px;
}

.players input {
    padding: 10px 12px;
    margin: 6px;

    border-radius: 8px;
    border: none;
    outline: none;

    width: 160px;

    background: rgba(255,255,255,0.15);
    color: white;

    backdrop-filter: blur(8px);

    font-size: 14px;

    transition: 0.3s;
}

.players input::placeholder {
    color: rgba(255,255,255,0.7);
}

.players input:focus {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* BOARD */
#board {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 20px auto;
}

/* CELLS */
.cell {
    position: absolute;
    width: 100px;
    height: 100px;

    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 2;

    transition: 0.2s;
}

/* CELL POSITIONS */
.cell:nth-of-type(1){top:0;left:0;}
.cell:nth-of-type(2){top:0;left:110px;}
.cell:nth-of-type(3){top:0;left:220px;}
.cell:nth-of-type(4){top:110px;left:0;}
.cell:nth-of-type(5){top:110px;left:110px;}
.cell:nth-of-type(6){top:110px;left:220px;}
.cell:nth-of-type(7){top:220px;left:0;}
.cell:nth-of-type(8){top:220px;left:110px;}
.cell:nth-of-type(9){top:220px;left:220px;}

/* HOVER EFFECT */
.cell:hover {
    text-shadow: 0 0 20px #fff;
    transform: scale(1.1);
}

/* GRID LINES */
.line {
    position: absolute;
    background: white;
}
.v1{width:3px;height:320px;left:105px;}
.v2{width:3px;height:320px;left:215px;}
.h1{height:3px;width:320px;top:105px;}
.h2{height:3px;width:320px;top:215px;}

/* WIN LINE */
.win-line {
    position: absolute;
    background: red;
    height: 4px;          /* 🔥 thin line */
    width: 0;
    z-index: 10;
    border-radius: 5px;
}

/* SHAKE */
.shake {
    animation: shake 0.4s;
}
@keyframes shake {
    25% { transform: translate(5px, -5px); }
    50% { transform: translate(-5px, 5px); }
}

/* STATUS ANIMATION */
#status {
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* 🔥 GLOBAL BUTTON STYLE */
button {
    padding: 10px 18px;
    margin: 8px;

    border: none;
    border-radius: 10px;

    font-size: 14px;
    font-weight: bold;

    cursor: pointer;

    background: linear-gradient(135deg, #ff512f, #dd2476);
    color: white;

    box-shadow: 0 0 10px rgba(255, 80, 80, 0.6);

    transition: 0.3s;
}

button:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 80, 80, 0.9);
}

/* CONTROL BUTTONS */
.controls button {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
}

/* THEME BUTTON */
.theme-btn {
    position: absolute;
    top: 15px;
    right: 20px;

    padding: 10px 14px;
    font-size: 18px;

    border-radius: 50%;

    background: #ffd700;
    color: black;

    box-shadow: 0 0 15px #ffd700;

    z-index: 1000;
}

/* LEADERBOARD */
.leaderboard-section {
    flex: 0.7;
    padding: 20px;

    border-left: 2px solid rgba(255,255,255,0.2);

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);

    border-radius: 15px;
}

/* 🌞 LIGHT THEME */
body.light {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #222;
}

body.light #board {
    background: rgba(255,255,255,0.3);
    border-radius: 15px;
}

body.light .leaderboard-section {
    background: rgba(255,255,255,0.4);
    color: black;
}

body.light .players input {
    background: rgba(0,0,0,0.1);
    color: black;
}

body.light .players input::placeholder {
    color: rgba(0,0,0,0.5);
}

body.light .players input:focus {
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

/* 🎮 ARENA PAGE */
.arena {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;

    background: radial-gradient(circle at center,
        #0a0f2c 0%,
        #050816 50%,
        #02030a 100%
    );

    color: white;
}

.arena-container {
    text-align: center;
}

/* PLAY BUTTON */
.play-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 22px;

    border-radius: 12px;

    background: #ff4b2b;
    color: white;

    transition: 0.3s;
}

.play-btn:hover {
    transform: scale(1.1);
    background: #ff1e00;
}
.profile-btn {
    position: absolute;
    top: 15px;
    right: 70px; /* theme ke side me */

    padding: 8px 12px;
    border-radius: 10px;

    background: #00c6ff;
    color: black;

    cursor: pointer;
    z-index: 1000;
}
.profile-btn:hover {
    box-shadow: 0 0 15px #00c6ff;
}

/* PROFILE PAGE */

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    height: 100vh;
    text-align: center;
}

/* CARD */
.profile-card {
    margin-top: 20px;
    padding: 20px 30px;

    border-radius: 15px;

    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);

    box-shadow: 0 0 20px rgba(0,0,0,0.4);

    font-size: 18px;
}

/* ACHIEVEMENTS */
.achievements-box {
    margin-top: 20px;
    padding: 20px;

    border-radius: 15px;

    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.achievements-box ul {
    list-style: none;
    padding: 0;
}

.achievements-box li {
    margin: 8px;
    font-size: 16px;
}

/* BUTTON */
.profile-container button {
    margin-top: 20px;
    padding: 10px 20px;

    border: none;
    border-radius: 10px;

    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;

    cursor: pointer;
}

/* 🌞 LIGHT THEME FIX */
body.light .profile-card,
body.light .achievements-box {
    background: rgba(255,255,255,0.4);
    color: black;
}
.logout-btn {
    position: absolute;
    top: 15px;
    right: 130px;

    padding: 8px 12px;
    border-radius: 10px;

    background: #ff4b2b;
    color: white;

    cursor: pointer;
}

/* LOGIN PAGE */

.login-container {
    text-align: center;
    padding: 40px;

    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);

    border-radius: 20px;
    width: 300px;

    margin: auto;
    margin-top: 120px;

    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

/* INPUTS */
.login-container input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;

    border-radius: 10px;
    border: none;

    outline: none;
}

/* LOGIN BUTTON */
.login-btn {
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;

    font-size: 16px;
    cursor: pointer;

    transition: 0.3s;
}

.login-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #00c6ff;
}

/* SIGNUP BUTTON */
.signup-btn {
    margin-top: 10px;
    padding: 10px;

    border: none;
    border-radius: 10px;

    background: linear-gradient(135deg, #ff4b2b, #ff416c);
    color: white;

    cursor: pointer;
}

.signup-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #ff4b2b;
}

.guide-box {
    margin-top: 20px;
    border-radius: 15px;
    overflow: hidden;

    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

/* HEADER */
.guide-header {
    padding: 12px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
}

/* CONTENT (hidden by default) */
.guide-content {
    display: none;
    padding: 10px;
}

.guide-content ul {
    list-style: none;
    padding: 10px;
}

.guide-content li {
    margin: 6px 0;
}

/* LIGHT MODE */
body.light .guide-box {
    background: rgba(255,255,255,0.4);
    color: black;
}
#board { position: relative; }






