@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

*, body, button, input, select, textarea {
    font-family: 'Nunito Sans', sans-serif;
}

:root {
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --info: #06b6d4;
    --bg-light: #f5f3ff;
    --sidebar-width: 240px;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-light);
    color: #1e293b;
}

.navbar.bg-dark {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.hero-section {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
    color: white;
    padding: 100px 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 16px;
    background: white;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}

.btn-info {
    background-color: var(--info);
    border-color: var(--info);
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
    border-color: #0891b2;
    color: white;
}

.auth-card {
    max-width: 450px;
    margin: 80px auto;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.1);
}

.mobile-header {
    display: none;
    background: white;
    padding: 12px 18px;
    border-bottom: 1px solid #ede9fe;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1020;
    width: 100%;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1030;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: white;
    border-right: 1px solid #ede9fe;
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1035;
    box-shadow: 2px 0 10px rgba(124, 58, 237, 0.05);
}

.sidebar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 32px;
    padding: 8px 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.sidebar-nav a:hover {
    background-color: var(--bg-light);
    color: var(--primary);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.sidebar-nav a i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.search-input {
    max-width: 260px;
    border-radius: 10px;
    border: 2px solid #ede9fe;
    padding: 8px 16px;
    font-size: 0.9rem;
    background: white;
}

.search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.stat-card {
    border: none;
    border-radius: 16px;
    padding: 20px 24px;
    color: white;
}

.task-card {
    border: none;
    border-radius: 14px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
}

.tag {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-block;
    margin-right: 5px;
    letter-spacing: 0.3px;
}

.tag-study {
    background: #ede9fe;
    color: var(--primary);
}

.tag-exam {
    background: #fef3c7;
    color: #d97706;
}

.tag-high {
    background: #fee2e2;
    color: #dc2626;
}

.tag-done {
    background: #d1fae5;
    color: #059669;
}

.schedule-item {
    border-left: 3px solid var(--primary-light);
    padding: 10px 16px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    background: var(--bg-light);
    transition: background 0.2s;
}

.schedule-item:hover {
    background: #ede9fe;
}

.section-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 14px;
}

.chart-card {
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.dashboard-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    background: white;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.15);
}

.timer-circle-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: #ede9fe;
    stroke-width: 12;
}

.timer-circle-progress {
    fill: none;
    stroke: url(#timerGradient);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.timer-circle-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.timer-circle-display {
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    line-height: 1.1;
    margin: 4px 0;
}

.timer-circle-label {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
}

.timer-display {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--primary);
}

.timer-label {
    font-size: 1.2rem;
    font-weight: 600;
}

.note-card {
    border-radius: 14px;
    border: none;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.countdown-card {
    border-radius: 14px;
    border: none;
    border-left: 4px solid var(--primary-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.countdown-card.exam-over {
    border-left-color: var(--danger);
    opacity: 0.7;
}

.task-done {
    text-decoration: line-through;
    opacity: 0.6;
}

.exam-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    font-size: 0.82rem;
    padding: 6px 14px;
}

footer {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #c4b5fd;
    padding: 20px 0;
    margin-top: 60px;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-warning {
    color: var(--accent) !important;
}

.btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-outline-success {
    color: var(--success);
    border-color: var(--success);
}

.btn-outline-success:hover {
    background-color: var(--success);
    border-color: var(--success);
}

.btn-outline-warning {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-outline-warning:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-warning {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    color: white;
}

.table-dark {
    background-color: var(--primary) !important;
}

.badge.bg-success {
    background-color: var(--success) !important;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
}

.badge.bg-warning {
    background-color: var(--accent) !important;
    color: white !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

@media (max-width: 991px) {
    .mobile-header {
        display: flex;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        height: 100vh;
        overflow-y: auto;
        position: fixed;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 16px 14px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
    }
    .top-bar > div:last-child {
        width: 100%;
        justify-content: space-between;
    }
    .search-input {
        max-width: 100%;
        flex-grow: 1;
    }
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2.3rem;
    }
    .stat-card {
        padding: 14px 16px;
    }
    .stat-card h3 {
        font-size: 1.5rem;
    }
    .timer-display {
        font-size: 3.5rem;
    }
}

@media (max-width: 575px) {
    .stat-card {
        padding: 12px 14px;
    }
    .stat-card p {
        font-size: 0.75rem !important;
    }
    .stat-card h3 {
        font-size: 1.3rem;
    }
    .timer-display {
        font-size: 2.7rem;
        letter-spacing: 2px;
    }
    .timer-circle-wrap {
        width: 240px;
        height: 240px;
    }
    .timer-circle-display {
        font-size: 2.8rem;
    }
    .auth-card {
        margin: 30px auto;
        padding: 10px;
    }
}
