 @import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --primary: #5E81F4;
    --primary-light: #E5E9FA;
    --secondary: #4b2c7c;
    --success: #7CE7AC;
    --warning: #FFBE5C;
    --danger: #FF808B;
    --text: #1A1D28;
    --text-light: #8A8FA8;
    --bg: #F6F7FB;
    --card-bg: #FFFFFF;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.1);
    --sidebar-width: 250px;
    --header-height: 60px;
    --bottom-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins';
}

body {
    background-color: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-header .menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-header .title {
    font-size: 1.2rem;
    font-weight: 500;
    flex-grow: 1;
    text-align: center;
    padding: 0 10px;
}

.mobile-header .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background-size: cover;
    background-position: center;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.75rem;
    flex: 1;
    height: 100%;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
}

.bottom-nav-item.active {
    color: var(--primary);
    position: relative;
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 30px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    z-index: 200;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding-top: var(--header-height);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
    background-size: cover;
    background-position: center;
}

.sidebar-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
}

.sidebar-email {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-item i {
    margin-right: 10px;
    font-size: 1.1rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.sidebar-item.active,
.sidebar-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Main Content */
.main-content {
    padding: calc(var(--header-height) + 15px) 15px calc(var(--bottom-nav-height) + 15px);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    width: calc(100% - 20px);
    transition: all 0.3s ease;
}

/* Header Section */
.header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 i {
    color: var(--secondary);
}

.welcome-message {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
    width: 100%;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-info p {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 i {
    color: var(--secondary);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.view-all:hover {
    text-decoration: underline;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Calendar Styles */
.calendar {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-nav {
    background-color: var(--primary-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.calendar-nav:hover {
    background-color: var(--primary);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-weekdays {
    display: contents;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: bold;
    font-size: 0.65rem;
    color: var(--text-light);
    padding: 5px 0;
}

.calendar-days {
    display: contents;
}

.calendar-day {
    aspect-ratio: 1/1;
    background-color: var(--primary-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    font-size: 0.7rem;
}

.calendar-day:hover {
    background-color: var(--primary);
    color: white;
}

.calendar-day.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-day.empty:hover {
    background-color: transparent;
}

.day-number {
    font-weight: bold;
    font-size: 0.75rem;
}

.assignment-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 2px;
}

.calendar-day.today {
    background-color: var(--success);
    color: white;
    transform: scale(1.05);
}

.today-label {
    position: absolute;
    bottom: 2px;
    font-size: 0.5rem;
    font-weight: bold;
    background-color: white;
    color: var(--success);
    padding: 1px 3px;
    border-radius: 6px;
}

.calendar-day.active {
    background-color: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Assignments List */
.assignment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.assignment-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--primary-light);
    transition: all 0.3s;
}

.assignment-item.highlight {
    background-color: var(--primary);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(94, 129, 244, 0.3);
}

.assignment-item.highlight .assignment-meta span,
.assignment-item.highlight .assignment-info h4 {
    color: white;
}

.assignment-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.assignment-info {
    flex-grow: 1;
    min-width: 0;
}

.assignment-info h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assignment-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-light);
}

.assignment-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.assignment-badges {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: bold;
    white-space: nowrap;
}

.badge.reading {
    background-color: rgba(126, 231, 172, 0.2);
    color: #0A8F5E;
}

.badge.math {
    background-color: rgba(94, 129, 244, 0.2);
    color: var(--primary);
}

.badge.important {
    background-color: rgba(255, 128, 139, 0.2);
    color: var(--danger);
}

.btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

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

.btn.start-btn:hover {
    background-color: #4A6FDC;
    transform: translateY(-2px);
}

.btn.start-btn:disabled {
    background-color: #E0E0E0;
    color: #A0A0A0;
    cursor: not-allowed;
    transform: none;
}

/* Progress Tracker */
.progress-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 15px 0 20px;
}

.path-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.path-item.completed {
    background-color: var(--success);
    color: white;
}

.path-item.current {
    background-color: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(94, 129, 244, 0.3);
}

.path-item.upcoming {
    background-color: #E0E0E0;
    color: #A0A0A0;
}

.path-icon {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.path-label {
    font-size: 0.65rem;
    text-align: center;
    font-weight: bold;
}

.path-connector {
    display: none;
    height: 3px;
    width: 25px;
    margin: 0 -5px;
}

.path-connector.completed {
    background-color: var(--success);
}

.path-connector:not(.completed) {
    background-color: #E0E0E0;
}

/* Rewards Section */
.rewards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 10px;
    background-color: var(--primary-light);
    transition: all 0.3s;
}

.reward-item.earned {
    background-color: var(--success);
    color: white;
}

.reward-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.reward-item.earned .reward-badge {
    background-color: white;
    color: var(--success);
}

.reward-item:not(.earned) .reward-badge {
    background-color: #E0E0E0;
    color: #A0A0A0;
}

.reward-label {
    font-size: 0.65rem;
    font-weight: bold;
    text-align: center;
}

/* Progress Chart */
.progress-chart-container {
    height: 200px;
    margin-bottom: 20px;
    min-width: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 15px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 2.5rem;
    color: #E0E0E0;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.today-label {
    animation: bounce 1.5s infinite;
}

.path-item.current {
    animation: bounce 2s infinite;
}

.waving-hand {
    animation: wave 2s infinite;
    display: inline-block;
}

/* Responsive Breakpoints */
@media (min-width: 600px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .assignment-item {
        flex-direction: row;
        align-items: center;
    }

    .assignment-meta {
        flex-direction: row;
        gap: 12px;
    }

    .btn.start-btn {
        width: auto;
        margin-top: 0;
    }
}

@media (min-width: 768px) {
    .mobile-header,
    .bottom-nav {
        display: none;
    }

    .main-content {
        padding: 30px;
        margin-left: var(--sidebar-width);
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .sidebar {
        left: 0;
        width: var(--sidebar-width);
        padding-top: 0;
        transform: none;
    }

    .sidebar-overlay {
        display: none;
    }

    .header {
        flex-direction: row;
        align-items: center;
    }

    .progress-path {
        flex-direction: row;
        justify-content: center;
    }

    .path-connector {
        display: block;
    }

    .rewards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .two-column {
        grid-template-columns: 1fr 1fr;
    }

    .quick-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .path-connector {
        width: 40px;
    }
}

@media (min-width: 1200px) {
    .dashboard {
        max-width: 1200px;
        margin: 0 auto;
    }
}