/* =========================================
   GOOGLE FONT
========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* =========================================
   ROOT VARIABLES
========================================= */

:root {

    --primary: #7c3aed;
    --secondary: #06b6d4;

    --dark: #020617;
    --dark-card: rgba(255,255,255,0.06);

    --white: #ffffff;
    --light-text: #cbd5e1;

    --border: rgba(255,255,255,0.1);

    --success: #22c55e;
    --danger: #ef4444;

    --shadow:
        0 20px 40px rgba(0,0,0,0.35);

    --transition: 0.4s ease;

}

/* =========================================
   LIGHT MODE
========================================= */

body.light-mode {

    --dark: #f8fafc;

    --dark-card: rgba(255,255,255,0.7);

    --white: #0f172a;

    --light-text: #475569;

    background: #f1f5f9;

}

/* =========================================
   GLOBAL
========================================= */

* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

}

body {

    font-family: 'Poppins', sans-serif;

    background: var(--dark);

    color: var(--white);

    min-height: 100vh;

    overflow-x: hidden;

    position: relative;

    transition: var(--transition);

}

/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {

    width: 8px;

}

::-webkit-scrollbar-thumb {

    background:
        linear-gradient(
            to bottom,
            var(--primary),
            var(--secondary)
        );

    border-radius: 20px;

}

/* =========================================
   MATRIX CANVAS
========================================= */

#matrixCanvas {

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    opacity: 0.08;

    z-index: -3;

}

/* =========================================
   PARTICLES
========================================= */

.particles-container {

    position: fixed;

    width: 100%;
    height: 100%;

    overflow: hidden;

    z-index: -2;

}

.particle {

    position: absolute;

    border-radius: 50%;

    background: rgba(255,255,255,0.3);

    animation: floatParticle linear infinite;

}

@keyframes floatParticle {

    from {

        transform: translateY(100vh);

        opacity: 0;

    }

    to {

        transform: translateY(-100vh);

        opacity: 1;

    }

}

/* =========================================
   CURSOR GLOW
========================================= */

.cursor-glow {

    position: fixed;

    width: 300px;
    height: 300px;

    border-radius: 50%;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(124,58,237,0.25),
            transparent 70%
        );

    transform: translate(-50%, -50%);

    z-index: -1;

}

/* =========================================
   PREMIUM LOADER
========================================= */

.loader-wrapper {

    position: fixed;

    width: 100%;
    height: 100vh;

    top: 0;
    left: 0;

    display: flex;

    justify-content: center;
    align-items: center;

    background: #020617;

    z-index: 999999;

    transition: 0.5s ease;

}

.loader {

    display: flex;

    gap: 15px;

}

.loader span {

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background:
        linear-gradient(
            to right,
            var(--primary),
            var(--secondary)
        );

    animation: bounce 0.6s infinite alternate;

}

.loader span:nth-child(2) {

    animation-delay: 0.2s;

}

.loader span:nth-child(3) {

    animation-delay: 0.4s;

}

@keyframes bounce {

    from {

        transform: translateY(0);

    }

    to {

        transform: translateY(-20px);

    }

}

/* =========================================
   DASHBOARD LAYOUT
========================================= */

.dashboard {

    display: flex;

    min-height: 100vh;

}

/* =========================================
   SIDEBAR
========================================= */

.sidebar {

    width: 280px;

    padding: 30px 20px;

    border-right: 1px solid var(--border);

    background: rgba(255,255,255,0.03);

    backdrop-filter: blur(20px);

    position: sticky;

    top: 0;

    height: 100vh;

}

/* LOGO */

.logo {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 50px;

    font-size: 1.4rem;

    font-weight: 700;

}

.logo i {

    color: var(--secondary);

}

/* MENU */

.menu {

    list-style: none;

    display: flex;

    flex-direction: column;

    gap: 18px;

}

.menu li {

    padding: 16px 18px;

    border-radius: 16px;

    cursor: pointer;

    transition: var(--transition);

    display: flex;

    align-items: center;

    gap: 15px;

    color: var(--light-text);

}

.menu li:hover,
.menu li.active {

    background:
        linear-gradient(
            to right,
            rgba(124,58,237,0.3),
            rgba(6,182,212,0.2)
        );

    color: white;

}

/* =========================================
   AI TIP CARD
========================================= */

.ai-tip-card {

    margin-top: 50px;

    padding: 25px;

    border-radius: 25px;

    background: var(--dark-card);

    border: 1px solid var(--border);

    text-align: center;

    backdrop-filter: blur(20px);

}

.ai-tip-card i {

    font-size: 2rem;

    margin-bottom: 15px;

    color: var(--secondary);

}

.ai-tip-card p {

    color: var(--light-text);

    line-height: 1.7;

}

/* =========================================
   MAIN CONTENT
========================================= */

.main-content {

    flex: 1;

    padding: 35px;

}

/* =========================================
   TOPBAR
========================================= */

.topbar {

    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 35px;

}

.topbar h1 {

    font-size: 2.3rem;

    margin-bottom: 10px;

}

.topbar p {

    color: var(--light-text);

}

/* ACTIONS */

.top-actions {

    display: flex;

    align-items: center;

    gap: 20px;

}

/* THEME BUTTON */

#themeToggle {

    width: 55px;
    height: 55px;

    border: none;

    border-radius: 50%;

    cursor: pointer;

    color: white;

    font-size: 1.2rem;

    background:
        linear-gradient(
            to right,
            var(--primary),
            var(--secondary)
        );

}

/* PROFILE */

.profile img {

    width: 60px;
    height: 60px;

    border-radius: 50%;

    border: 3px solid var(--secondary);

}

/* =========================================
   STATS GRID
========================================= */

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit,minmax(220px,1fr));

    gap: 25px;

    margin-bottom: 35px;

}

/* CARD */

.stat-card {

    padding: 30px;

    border-radius: 30px;

    background: var(--dark-card);

    border: 1px solid var(--border);

    backdrop-filter: blur(25px);

    transition: var(--transition);

    box-shadow: var(--shadow);

}

.stat-card:hover {

    transform: translateY(-10px);

}

.stat-card i {

    font-size: 2rem;

    margin-bottom: 20px;

    color: var(--secondary);

}

.stat-card h2 {

    font-size: 2.2rem;

    margin-bottom: 10px;

}

.stat-card p {

    color: var(--light-text);

}

/* =========================================
   COUNTER SECTION
========================================= */

.counter-section {

    display: grid;

    grid-template-columns:
        2fr 1fr;

    gap: 30px;

    margin-bottom: 35px;

}

/* COUNTER CARD */

.counter-card {

    padding: 40px;

    border-radius: 35px;

    background: var(--dark-card);

    border: 1px solid var(--border);

    text-align: center;

    backdrop-filter: blur(25px);

    box-shadow: var(--shadow);

}

.counter-card h2 {

    margin-bottom: 35px;

    font-size: 2rem;

}

/* =========================================
   PROGRESS RING
========================================= */

.progress-wrapper {

    position: relative;

    width: 260px;
    height: 260px;

    margin: auto;

}

.progress-ring {

    transform: rotate(-90deg);

}

.progress-bg {

    fill: none;

    stroke: rgba(255,255,255,0.08);

    stroke-width: 14;

}

.progress-circle {

    fill: none;

    stroke:
        url(#gradient);

    stroke-width: 14;

    stroke-linecap: round;

    stroke-dasharray: 691;

    stroke-dashoffset: 691;

    transition: 0.5s ease;

}

/* COUNTER */

.counter-display {

    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%,-50%);

}

.counter-display span {

    font-size: 4rem;

    font-weight: 700;

    color: var(--secondary);

    text-shadow:
        0 0 20px rgba(6,182,212,0.5);

}

/* =========================================
   CONTROLS
========================================= */

.controls {

    display: flex;

    justify-content: center;

    gap: 20px;

    margin-top: 40px;

}

.btn {

    width: 70px;
    height: 70px;

    border: none;

    border-radius: 20px;

    cursor: pointer;

    font-size: 1.3rem;

    color: white;

    transition: var(--transition);

    box-shadow: var(--shadow);

}

.increment {

    background:
        linear-gradient(
            to right,
            #22c55e,
            #16a34a
        );

}

.decrement {

    background:
        linear-gradient(
            to right,
            #ef4444,
            #dc2626
        );

}

.reset {

    background:
        linear-gradient(
            to right,
            var(--primary),
            var(--secondary)
        );

}

.btn:hover {

    transform: translateY(-8px) scale(1.05);

}

/* =========================================
   KEYBOARD SHORTCUTS
========================================= */

.keyboard-shortcuts {

    margin-top: 35px;

    display: flex;

    flex-direction: column;

    gap: 12px;

}

.keyboard-shortcuts p {

    color: var(--light-text);

}

/* =========================================
   HISTORY PANEL
========================================= */

.history-panel {

    padding: 30px;

    border-radius: 35px;

    background: var(--dark-card);

    border: 1px solid var(--border);

    backdrop-filter: blur(25px);

    box-shadow: var(--shadow);

}

.history-panel h3 {

    margin-bottom: 25px;

}

/* HISTORY LIST */

#historyList {

    list-style: none;

    max-height: 350px;

    overflow-y: auto;

    display: flex;

    flex-direction: column;

    gap: 15px;

}

#historyList li {

    padding: 15px;

    border-radius: 16px;

    background: rgba(255,255,255,0.05);

    color: var(--light-text);

}

/* =========================================
   ACHIEVEMENT BOX
========================================= */

.achievement-box {

    margin-top: 30px;

}

.badges {

    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 15px;

}

.badges span {

    padding: 12px 16px;

    border-radius: 15px;

    background:
        linear-gradient(
            to right,
            var(--primary),
            var(--secondary)
        );

    font-size: 0.9rem;

}

/* =========================================
   MOTIVATION CARD
========================================= */

.motivation-card {

    padding: 40px;

    border-radius: 35px;

    background: var(--dark-card);

    border: 1px solid var(--border);

    text-align: center;

    backdrop-filter: blur(25px);

}

.motivation-card i {

    font-size: 2.5rem;

    margin-bottom: 20px;

    color: var(--secondary);

}

.motivation-card h2 {

    line-height: 1.7;

}

/* =========================================
   NOTIFICATION
========================================= */

.notification {

    position: fixed;

    top: 30px;
    right: 30px;

    padding: 18px 25px;

    border-radius: 18px;

    background:
        linear-gradient(
            to right,
            var(--primary),
            var(--secondary)
        );

    color: white;

    transform: translateX(400px);

    transition: 0.5s ease;

    z-index: 99999;

}

.notification.show {

    transform: translateX(0);

}

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

@media (max-width: 1100px) {

    .counter-section {

        grid-template-columns: 1fr;

    }

}

@media (max-width: 992px) {

    .dashboard {

        flex-direction: column;

    }

    .sidebar {

        width: 100%;

        height: auto;

        position: relative;

    }

}

@media (max-width: 768px) {

    .main-content {

        padding: 20px;

    }

    .topbar {

        flex-direction: column;

        align-items: flex-start;

        gap: 20px;

    }

    .controls {

        flex-wrap: wrap;

    }

    .progress-wrapper {

        width: 220px;
        height: 220px;

    }

    .counter-display span {

        font-size: 3rem;

    }

}

@media (max-width: 500px) {

    .topbar h1 {

        font-size: 1.8rem;

    }

    .counter-card,
    .history-panel,
    .motivation-card {

        padding: 25px;

    }

  }
