
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #101114;
    --card: #1b1c22;
    --border: #30313a;
    --text: #f5f5f7;
    --muted: #858792;
    --accent: #a78bfa;
    --danger: #fb7185;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font: inherit;
}

button, a, input, select {
    -webkit-tap-highlight-color: transparent;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent);
}

.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.small {
    font-size: 12px;
    margin-top: 14px;
}

.error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 15px;
}

.primary-btn,
.danger-btn {
    border: none;
    border-radius: 9px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: .2s ease;
}

.primary-btn {
    background: var(--accent);
    color: #17131f;
}

.primary-btn:hover {
    background: #b9a4ff;
    transform: translateY(-2px);
}

.danger-btn {
    background: #3a2028;
    color: #fb7185;
}

.danger-btn:hover {
    background: #512530;
}

.full-btn {
    width: 100%;
}

/* LOGIN */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 380px;
    text-align: center;
    animation: appear .5s ease;
}

.login-box .logo {
    font-size: 34px;
    margin-bottom: 10px;
}

.login-box .muted {
    margin-bottom: 35px;
}

.login-box input {
    margin-bottom: 12px;
}

/* INPUTS */

input, select {
    width: 100%;
    background: #17181e;
    border: 1px solid var(--border);
    color: white;
    padding: 15px;
    border-radius: 9px;
    outline: none;
    transition: .2s;
    margin-top: 9px;
}

input:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px #a78bfa18;
}

label {
    display: block;
    color: #b7b8c1;
    font-size: 13px;
    margin-top: 22px;
}

/* DASHBOARD */

.dashboard {
    width: 100%;
    max-width: 950px;
    margin: auto;
    padding: 0 25px;
}

.topbar {
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.logout {
    color: var(--muted);
    font-size: 13px;
    transition: .2s;
}

.logout:hover {
    color: white;
}

main {
    padding: 40px 0;
}

.welcome {
    margin-bottom: 30px;
}

.welcome h1 {
    font-size: 30px;
    margin: 5px 0;
    letter-spacing: -1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card, .timer-card, .activity-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 22px;
}

.stat-card h2 {
    font-size: 24px;
    margin-top: 8px;
}

/* TIMER */

.timer-card {
    margin-bottom: 45px;
}

.timer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timer-header h2 {
    font-size: 18px;
    margin-top: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555761;
}

.status-dot.running {
    background: #4ade80;
    box-shadow: 0 0 12px #4ade8060;
    animation: pulse 1.8s infinite;
}

.timer-display {
    font-size: clamp(38px, 8vw, 56px);
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin: 30px 0;
    font-variant-numeric: tabular-nums;
}

.timer-activity {
    color: var(--accent);
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* ACTIVITIES */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin-top: 5px;
    font-size: 23px;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.activity-card {
    transition: transform .2s, border-color .2s;
    animation: appear .4s ease both;
}

.activity-card:hover {
    transform: translateY(-2px);
    border-color: #454653;
}

.activity-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 23px;
}

.activity-top h3 {
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.grade {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    margin-top: 7px;
    letter-spacing: .5px;
}

.activity-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.activity-actions strong {
    font-size: 13px;
    white-space: nowrap;
}

.add-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #292a34;
    color: var(--accent);
    border: 1px solid #414250;
    font-size: 23px;
    cursor: pointer;
    transition: .2s;
}

.add-btn:hover {
    background: var(--accent);
    color: #17131f;
    transform: scale(1.08);
}

.progress-info, .activity-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: var(--muted);
}

.progress-info {
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 7px;
    background: #30313a;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease;
}

.activity-footer {
    margin-top: 10px;
}

.add-activity-btn {
    display: block;
    text-align: center;
    padding: 17px;
    margin-top: 20px;
    border: 1px dashed #494a56;
    border-radius: 12px;
    color: #b4a0ef;
    font-size: 14px;
    transition: .2s;
}

.add-activity-btn:hover {
    background: #a78bfa10;
    border-color: var(--accent);
}

.empty-state {
    padding: 35px 20px;
    text-align: center;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.empty-state h3 {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    color: #565761;
    font-size: 10px;
    letter-spacing: 2px;
    padding: 30px 0;
}

/* FORMS */

.form-page {
    max-width: 500px;
    margin: auto;
    padding: 35px 20px;
}

.back-link {
    display: inline-block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 30px;
    transition: .2s;
}

.back-link:hover {
    color: white;
}

.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    animation: appear .4s ease;
}

.form-card h1 {
    font-size: 26px;
    margin: 8px 0;
}

.form-card .primary-btn {
    margin-top: 25px;
}

.selected-activity {
    padding: 13px;
    margin-top: 22px;
    background: #a78bfa12;
    color: var(--accent);
    border-radius: 8px;
    font-size: 14px;
}

/* ANIMATIONS */

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    50% {
        opacity: .4;
    }
}

/* MOBILE */

@media (max-width: 600px) {

    .dashboard {
        padding: 0 16px;
    }

    main {
        padding-top: 28px;
    }

    .welcome h1 {
        font-size: 26px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card h2 {
        font-size: 19px;
    }

    .timer-card {
        padding: 18px;
    }

    .activity-card {
        padding: 17px;
    }

    .activity-top {
        align-items: flex-start;
    }

    .activity-actions {
        gap: 8px;
    }

    .activity-actions strong {
        font-size: 11px;
    }

    .form-card {
        padding: 22px;
    }
}
