/* =========================
   GENERAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #080b18;
    color: white;
    min-height: 100vh;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;

    width: 240px;
    height: 100vh;

    padding: 25px 15px;

    background: #10152b;
    border-right: 1px solid #252b4a;
}

.sidebar h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar a {
    text-decoration: none;
    color: #b9bfd8;

    padding: 12px 15px;
    border-radius: 10px;

    transition: 0.3s;
}

.sidebar a:hover {
    background: #20284b;
    color: white;
    transform: translateX(5px);
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: 240px;
    padding: 30px;
}


/* =========================
   TOP BAR
========================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 35px;
}

.topbar h2 {
    font-size: 24px;
}

#darkModeBtn {
    border: none;
    background: #20284b;
    color: white;

    padding: 10px 14px;
    border-radius: 10px;

    cursor: pointer;
    font-size: 18px;
}


/* =========================
   WELCOME
========================= */

.welcome {
    margin-bottom: 30px;
}

.welcome h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.welcome p {
    color: #9da5c5;
}

/* =========================
   STAT CARDS
========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    margin-bottom: 25px;
}

.card {
    background: #11172d;

    padding: 20px;

    border: 1px solid #252b4a;
    border-radius: 15px;

    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #6674ff;
}

.card h3 {
    margin-bottom: 15px;
}

.card p {
    font-size: 30px;
    font-weight: bold;

    margin-bottom: 5px;
}

.card span {
    color: #8f97b5;
    font-size: 14px;
}


/* =========================
   DASHBOARD GRID
========================= */

.dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: #11172d;

    padding: 25px;

    border: 1px solid #252b4a;
    border-radius: 15px;
}

.dashboard-card h2 {
    margin-bottom: 20px;
}


/* =========================
   LIGHT MODE
========================= */

body.light-mode {
    background: #f2f4fa;
    color: #171a2b;
}

body.light-mode .sidebar {
    background: #ffffff;
    border-color: #dddddd;
}

body.light-mode .sidebar a {
    color: #555b72;
}

body.light-mode .sidebar a:hover {
    background: #e9ecf5;
    color: #171a2b;
}

body.light-mode .card{
    background: #ffffff;
    
}
body.light-mode .dashboard-card {
    background: #ffffff;
    border-color: #dddddd;
}

body.light-mode .card span,
body.light-mode .welcome p {
    color: #666b7d;
}
/* =========================
   TIMER PAGE - LIGHT MODE
========================= */

body.light-mode #timerDisplay {
    color: #2c3e50;
}

body.light-mode .timer-buttons button {
    background: #4f7cff;
    color: white;
}

body.light-mode .timer-buttons button:hover {
    background: #3d68d8;
}

body.light-mode .preset {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;

    background: #eef3ff;
    color: #2c3e50;

    border: 1px solid #cdd8ff;
    border-radius: 10px;

    cursor: pointer;
    transition: 0.3s;
}

body.light-mode .preset:hover {
    background: #4f7cff;
    color: white;
}

body.light-mode ul {
    color: #2c3e50;
}

body.light-mode ul li {
    margin-bottom: 10px;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode p {
    color: #2c3e50;
}
/* =========================
   TIMER PAGE
========================= */

#timerDisplay {
    font-size: 80px;
    font-weight: bold;
    text-align: center;
    margin: 30px 0;
    letter-spacing: 4px;
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.timer-buttons button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.preset {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;

    border: none;
    border-radius: 10px;

    background: #252d55;
    color: white;

    cursor: pointer;
    transition: 0.3s;
}

.preset:hover {
    background: #37427a;
    transform: translateY(-2px);
}
/* =========================
   RESET SESSION BUTTON
========================= */

#resetSessionsBtn {
    padding: 10px 16px;
    margin-top: 10px;

    border: none;
    border-radius: 8px;

    background: #252d55;
    color: white;

    cursor: pointer;
    transition: 0.3s;
}

#resetSessionsBtn:hover {
    background: #37427a;
}


/* =========================
   LIGHT MODE
========================= */

body.light-mode #resetSessionsBtn {
    background: #eef3ff;
    color: #2c3e50;

    border: 1px solid #cdd8ff;
}

body.light-mode #resetSessionsBtn:hover {
    background: #6674ff;
    color: white;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .sidebar {
        width: 190px;
    }

    .main-content {
        margin-left: 190px;
    }

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

@media (max-width: 700px) {
    body {
        overflow-x: hidden;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 18px 12px;
        border-right: 0;
        border-bottom: 1px solid #252b4a;
    }

    .sidebar h1 {
        margin-bottom: 14px;
        font-size: 21px;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar a {
        flex: 1 1 135px;
        padding: 10px;
        text-align: center;
    }

    .sidebar a:hover {
        transform: none;
    }

    .main-content {
        margin-left: 0;
        padding: 18px 14px 28px;
    }

    .topbar {
        gap: 12px;
        margin-bottom: 24px;
    }

    .topbar h2 {
        font-size: 20px;
    }

    .welcome h1 {
        font-size: 26px;
    }

    .dashboard-card {
        padding: 18px;
    }

    #timerDisplay {
        font-size: clamp(46px, 17vw, 68px);
        letter-spacing: 2px;
    }

    .timer-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .timer-buttons button {
        flex: 1 1 120px;
        min-height: 44px;
        padding: 11px 14px;
    }
}
