body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Make sizing predictable and avoid overflow due to padding/margins */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }


html { 
    scroll-behavior: smooth;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #111827;
    color: #fff;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    background-attachment: fixed;
}

.sidebar h1 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar li {
    margin: 10px 0;
}

.sidebar ul a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 16px;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar ul a:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

.sidebar ul a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 20px;
    background-color: #0f172a;
    color: white;
    overflow-x: hidden;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 20px;
    width: 100%;
}

.card {
    background-color: #1e293b;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}  

.dashboard-content {
    margin-top: 15px;
    color: #cbd5e1;
    line-height: 1.6;
}

.dashboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    margin-bottom: 10px;
}

.dashboard-item strong {
    color: #f8fafc;
}

.dashboard-item span {
    color: #94a3b8;
    font-size: 14px;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-note {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 14px;
}

.task-section {
    margin-top: 40px;
}

.task-input {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.input {
    padding: 15px;
    border: none;
    border-radius: 5px;
    flex: 1;
   outline: none;
}

.task-input button {
    padding: 15px 25px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.input:focus {
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 10px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    color: white;
    transition: all 0.5s ease;
}

.task-list {
    margin-top: 30px;
}

.task-card {
    background-color: #1e293b;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #3b82f6;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.task-card.completed {
    opacity: 0.6;
    border-left-color: #10b981;
}

.task-card.completed h3 {
    text-decoration: line-through;
    color: #94a3b8;
}

.task-content {
    flex: 1;
}

.task-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #f1f5f9;
}

.task-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

.task-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.btn-complete, .btn-delete, .btn-edit {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-complete {
    background-color: #10b981;
    color: white;
}

.btn-complete:hover {
    background-color: #059669;
    transform: scale(1.05);
}

.btn-edit {
    background-color: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background-color: #d97706;
    transform: scale(1.05);
}

.btn-delete {
    background-color: #ef4444;
    color: white;
}

.btn-delete:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .task-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-actions {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }

    .btn-complete, .btn-delete, .btn-edit {
        flex: 1;
            text-align: center;
            width: 100%;
    }
}

.task-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.task-input button:active {
  transform: scale(0.98);
  
}

.task-list {
    margin-top: 30px;
    display: grid;
    gap: 15px;
}

.task-card {
    background-color: #1e293b;
    padding: 20px;
    border-radius: 15px;
}

.task-card h3 {
    margin: 0;
}

.timetable-section {
    margin-top: 50px;
}

.timetable-inputs {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.timetable-inputs input {
    padding: 15px;
    border: none;
    border-radius: 10px;
    flex: 1;
    outline: none;
}

.timetable-inputs button {
    padding: 15px 25px;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.timetable-inputs button:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    transform: scale(1.05);
}

.timetable-inputs input:focus {
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 10px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    color: white;
    transition: all 0.5s ease;
}

.class-list {
    margin-top: 30px;
    display: grid;
    gap: 15px;
}

.class-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 15px;
}

.timer-section {
    margin-top: 50px;
    background-color: #1e293b;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.timer-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #f1f5f9;
}

.timer-section p {
    color: #cbd5e1;
    margin-bottom: 30px;
}

.timer-display {
    font-size: 80px;
    font-weight: bold;
    margin: 30px 0;
    text-align: center;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    letter-spacing: 5px;
    padding: 30px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 15px;
    border: 2px solid #3b82f6;
    transition: all 0.3s ease;
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.timer-buttons button {
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-buttons button:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-3px);
    transform: scale(1.05);
}

.timer-buttons button:active:not(:disabled) {
    transform: scale(0.98);
}

.timer-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.exam-section {
    margin-top: 50px;
    background-color: #1e293b;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.exam-section h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #f1f5f9;
}

.exam-section p {
    color: #cbd5e1;
    margin-bottom: 30px;
}

.exam-inputs {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.exam-inputs input {
    padding: 15px;
    border: none;
    border-radius: 10px;
    flex: 1;
    outline: none;
    background-color: #0f172a;
    color: white;
    font-size: 16px;
}

.exam-inputs button {
    padding: 15px 25px;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.exam-inputs button:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    transform: scale(1.05);
}

.exam-inputs input:focus {
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    color: white;
    transition: all 0.5s ease;
}

.exam-list {
    margin-top: 30px;
    display: grid;
    gap: 15px;
}

.exam-card {
    background: #1e293b;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #3b82f6;
}

.exam-card:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.exam-card.overdue {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #1e293b, #451a1a);
}

.exam-card.today {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #1e293b, #451a0a);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
    100% { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
}

.exam-content {
    flex: 1;
}

.exam-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #f1f5f9;
}

.exam-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

.countdown {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    display: inline-block;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.countdown.overdue-text {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.countdown.today-text {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.exam-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.exam-actions .btn-edit, .exam-actions .btn-delete {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.exam-actions .btn-edit {
    background-color: #f59e0b;
    color: white;
}

.exam-actions .btn-edit:hover {
    background-color: #d97706;
    transform: scale(1.05);
}

.exam-actions .btn-delete {
    background-color: #ef4444;
    color: white;
}

.exam-actions .btn-delete:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

section {
    transition: all 0.5s ease;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0;
     transform: translateY(10px);
    }
    to { opacity: 1;
     transform: translateY(0);
    }
}

.label {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 5px;
    display: block;

}

 .card{
    position: relative;
    overflow: hidden;
}



.card ::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    top: -80px;
    right: -80px;
    border-radius: 50%;
    filter: blur(35px);
    opacity: 0.2;
    z-index: 0;
    background-size: 300% 300%;
    animation: glowmove 15s ease-in-out infinite alternate;
}

@keyframes glowmove {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-20px, 10px) scale(1.1);
    }
    100% {
        transform: translate(10px, -10px) scale(0.95);
    }
}



.card * {
    position: relative;
    z-index: 2;
}


.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;  
    margin-top: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
     padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: 0.3s ease;
}

.stat-card1 {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: 0.3s ease;
}

.stat-card1:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.stat-card1 h3 {
    font-size: 1rem;
    color: #bdbdbd;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card1 p {
    font-size: 2rem;
    color: white;
    font-weight: bold;
}



.stat-card:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 1rem;
    color: #bdbdbd;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card p {
    font-size: 2rem;
    color: white;
    font-weight: bold;
}

.streak-card {
    margin-top: 20px;
    padding: 20px;
    border-radius: 20px;

    background: linear-gradient(135deg, #ff7b00, #ffb700);
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}


.weekly-overview {
    margin-top: 30px;
}

.weekly-overview h2 {
     margin-bottom: 20px;
    color:white;
}

.weekly-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.weekly-card h3 {
    margin-bottom: 10px;
    color: #bdbdbd;
}

.weekly-card p {
    color: white;
    font-weight: bold;
    font-size: 1.8rem;
}

.chart-container {
   margin-top: 30px;
   background: rgba(255, 255, 255, 0.08);
   padding: 25px;
   border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.chart-container h2 {
   color: white;
    margin-bottom: 20px;
}

.heatmap-container, .productivity-heatmap {
    margin-top: 24px;
    background: rgba(255,255,255,0.04);
    padding: 18px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.heatmap-stats {
    display: flex;
    gap: 18px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16px, 1fr));
    gap: 6px;
    align-items: center;
    margin-bottom: 14px;
}

.heat-square {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.heat-square:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.study-activity-chart { margin-top: 10px; }
.study-activity-chart canvas { height: 140px !important; }

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.chart-card h3 {
    margin-bottom: 16px;
    color: #bdbdbd;
}

.chart-card canvas,
.chart-container canvas {
    width: 100% !important;
    max-height: 280px !important;
    height: auto !important;
}

.study-activity-chart {
    margin-top: 10px;
    overflow-x: auto;
}

.study-activity-chart canvas {
    min-height: 120px !important;
    height: auto !important;
}

#recent-actions-card {
    grid-column: span 1;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #cbd5e1;
}

.action-item:last-child {
    border-bottom: none;
}

.action-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.action-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-time {
    font-size: 0.8rem;
    color: #64748b;
    flex-shrink: 0;
}
    



.heatmap-container {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
}

.heatmap-container h2 {
    color: white;
    margin-bottom: 20px;
}


#heatmapGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16px, 1fr));
    gap: 6px;
    margin-bottom: 20px;
}

.heatmap-day {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    background: #1e1e1e;
}   

.level-1 {
    background: #2ecc71;
}

.level-2 {
    background: #27ae60;
}

.level-3 {
    background: #145a32;
}


.activity-container {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.activity-container h2 {
    color: white;
    margin-bottom: 20px;
}

.activity-item {
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
    color: white;
    font-size: 0.95rem;
    border-left: 4px solid #00ff88;
}


.achievement-container {
   margin-top: 30px;
   background: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.achievement-container h2 {
    color: white;
    margin-bottom: 20px;
}

#achievementGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    color: white;
    transition: 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}



.reminder-container {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}


.reminder-container h2 {
    color: white;
    margin-bottom: 20px;
}

.reminder-card {
    padding: 16px;
    border-radius: 15px;
    color: white;
    margin-bottom: 12px;
    font-weight: 500;
}

.warning {
    background: rgba(255, 77, 77, 0.2);
    border-left: 4px solid #ff4d4d;
}

.info {
    background: rgba(0, 170, 255, 0.2);
    border-left: 4px solid #00aaff;
}


.success {
    background: rgba(0, 255, 136, 0.2);
    border-left: 4px solid #00ff88;
}


.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;

    padding: 25px;

    border-radius: 25px;

    background: rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(10px);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);

    margin-bottom: 30px;
}


.profile-left {
    display: flex;
    align-items: center;
    gap: 20px;
}


.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;

    border: 2px solid #00ff88;
}


.profile-left h1 {
    color: white;
    font-size: 1.8rem;
}

.motivation-text {
    color: #bdbdbd;
    margin-top: 5px;
}

.profile-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 18px;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    text-align: center;
}

#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    z-index: 9999;
}

.notification {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    color: white;
    font-size:0.9rem;
    animation: slideIn 0.4s ease;  
    backdrop-filter: blur(10px); 
}

.notification.success {
    background: rgba(0, 255, 136, 0.2);
    border-left: 4px solid #00ff88;
}

.notification.warning {
    background: rgba(255, 77, 77, 0.2);
    border-left: 4px solid #ff4d4d;
}

.notification.info {
    background: rgba(0, 170, 255, 0.2);
    border-left: 4px solid #00aaff;
}

@keyframes slideIn {
    from {
         transform: translateX(100%);
        opacity: 0;
       
    }
    to {
        
        transform: translateX(0);
        opacity: 1;
    }
}

.focus-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 9999;
}

.hidden {
    display: none;
}

.timer {
   font-size: 4rem;
   font-weight: bold;
   margin: 20px 0;
}

#ai-section {
    margin-top: 40px;
    padding: 0;
}

.ai-chat-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 72vh;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.ai-tag {
    display: inline-block;
    margin: 0 0 8px 0;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #7dd3fc;
}

.ai-chat-header h1 {
    margin: 0;
    font-size: clamp(1.65rem, 2vw, 2.3rem);
    color: #f8fafc;
}

.ai-subtitle {
    margin: 8px 0 0;
    max-width: 720px;
    color: #cbd5e1;
    line-height: 1.65;
}

.ai-settings-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ai-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ai-field span {
    color: #94a3b8;
    font-size: 0.95rem;
}

.ai-field input,
.ai-field select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
    color: #f8fafc;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-field input:focus,
.ai-field select:focus,
.chat-input-panel textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.ai-field-mode {
    min-width: 180px;
}

.chat-window {
    min-height: 360px;
    max-height: 62vh;
    overflow-y: auto;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    flex: 1;
}

.chat-input-panel {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 1));
}

.chat-message {
    max-width: 88%;
    padding: 16px 18px;
    border-radius: 22px;
    position: relative;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.ai {
    align-self: flex-start;
    background: #111827;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-message.system {
    align-self: center;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-style: italic;
    border-radius: 18px;
}

.chat-input-panel {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 1));
}

.chat-input-panel textarea {
    min-height: 56px;
    max-height: 160px;
    width: 100%;
    resize: vertical;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
    color: #f8fafc;
    outline: none;
    font-size: 1rem;
}

.chat-input-panel button {
    padding: 16px 24px;
    border-radius: 18px;
    border: none;
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.chat-input-panel button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.chat-input-panel button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 980px) {
    .ai-settings-panel {
        grid-template-columns: 1fr;
    }

    .chat-window {
        min-height: 320px;
    }
}

@media (max-width: 640px) {
    .ai-chat-container {
        padding: 18px;
    }

    .ai-chat-header h1 {
        font-size: 1.75rem;
    }

    .chat-input-panel {
        grid-template-columns: 1fr;
    }

    .chat-input-panel button {
        width: 100%;
    }
}

#login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.login-box {
    background: #0b1f3a;
    padding: 30px;
    border-radius: 15px;
    width: min(360px, calc(100% - 32px));
    box-shadow: 0 8px 20px rgba(0, 0, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-box h1 {
    color: white;
    text-align: center;
    width: 100%;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    outline: none;
}

.login-box button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    font-weight: bold;
    cursor: pointer;
}

#message {
    margin-top: 10px;
    text-align: center;
    color: white;
}

#authMessage {
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

.stats {
    margin-top: 20px;
    color: white;
    font-size: 14px;
}

#notification {
    position: fixed;
    top: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    width: auto;
    max-width: min(360px, calc(100vw - 32px));
}

.notification {
    background: #0b1f3a;
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    width: auto;
    max-width: 100%;
    box-shadow: 0 0 15px rgba(0, 120, 255, 0.3);
    transform: translateX(200%);
    opacity: 0;
    animation: slideIn 0.5s forwards;
}

@media (max-width: 640px) {
    #notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100vw - 20px);
    }

    .notification {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    #notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
    }

    .notification {
        min-width: unset;
        width: auto;
        max-width: 100%;
        font-size: 0.95rem;
        padding: 12px 14px;
    }
}

.notification.success {
   border-left: 4px solid #00ff88;
}

.notification.warning {
    border-left: 4px solid #ff4d4d;
}

.notification.info {
    border-left: 4px solid #00aaff;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


@keyframes fadeout {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}



.support-section {
    padding: 20px;
}

.support-card {
    background: #0f172a;
    border: 1px solid #1e40af;
    border-radius: 16px;
    padding: 20px;
}


.support-card h2 {
    margin-bottom: 10px;
}

.support-card p {
    color: #cbd5e1;
    line-height: 1.6;
}   


.support-card a {
    text-decoration: none;
}

.support-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}


.support-btn {
    background: #2563eb;
    color: white;
    border: none;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.support-btn:hover {
    background: #1d4ed8;
}

.donation-info {
    margin-top: 20px;
    padding: 15px;
    background: #111827;
    border-radius: 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 300ms ease, opacity 300ms ease;
}

.donation-info.open {
    opacity: 1;
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        padding: 12px;
    }

    .sidebar {
        width: 100%;
        padding: 12px;
        box-shadow: none;
        border-bottom: 1px solid #374151;
    }

    .sidebar h1 {
        margin-bottom: 10px;
        font-size: 18px;
    }

    .sidebar ul {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 5px;
    }

    .sidebar li {
        margin: 0;
        flex-shrink: 0;
    }

    .sidebar ul a {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
        border-radius: 6px;
    }

    .sidebar ul a.active {
        transform: none;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 15px;
        min-height: auto;
    }

    .card ::before {
        display: none;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 12px;
    }

    .profile-left {
        gap: 12px;
    }

    .profile-pic {
        width: 60px;
        height: 60px;
    }

    .profile-left h1 {
        font-size: 1.3rem;
    }

    .profile-right {
        width: 100%;
        flex-direction: row;
        gap: 8px;
    }

    .profile-badge {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .stat-card, .stat-card1 {
        padding: 15px;
    }

    .stat-card h3, .stat-card1 h3 {
        font-size: 0.9rem;
    }

    .stat-card p, .stat-card1 p {
        font-size: 1.5rem;
    }

    .streak-card {
        margin-top: 12px;
        padding: 15px;
    }

    .weekly-overview {
        margin-top: 20px;
    }

    .weekly-card {
        padding: 15px;
        margin-bottom: 10px;
    }

    .task-input {
        flex-direction: column;
        gap: 10px;
    }

    .input {
        flex: 1;
        padding: 12px;
    }

    .task-input button {
        padding: 12px 15px;
        font-size: 14px;
        width: 100%;
    }

    .task-list {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .task-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 10px;
    }

    .task-content {
        width: 100%;
    }

    .task-actions {
        margin-left: 0;
        width: 100%;
        gap: 8px;
    }

    .btn-complete, .btn-delete, .btn-edit {
        flex: 1;
        padding: 8px 0;
        font-size: 12px;
    }

    .timetable-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .timetable-inputs input {
        flex: 1;
        padding: 12px;
    }

    .timetable-inputs button {
        padding: 12px 15px;
        font-size: 14px;
        width: 100%;
    }

    .class-list {
        gap: 10px;
    }

    .class-card {
        padding: 15px;
    }

    .timer-section {
        padding: 20px;
        margin-top: 20px;
    }

    .timer-display {
        font-size: 48px;
        padding: 15px;
        letter-spacing: 2px;
    }

    .timer-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .timer-buttons button {
        padding: 12px;
        font-size: 14px;
        width: 100%;
        min-width: unset;
    }

    .exam-section {
        padding: 20px;
        margin-top: 20px;
    }

    .exam-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .exam-inputs input {
        flex: 1;
        padding: 12px;
    }

    .exam-inputs button {
        padding: 12px 15px;
        font-size: 14px;
        width: 100%;
    }

    .exam-list {
        gap: 10px;
    }

    .exam-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 10px;
    }

    .exam-content {
        width: 100%;
    }

    .exam-actions {
        margin-left: 0;
        width: 100%;
        gap: 8px;
    }

    .exam-actions .btn-edit, .exam-actions .btn-delete {
        flex: 1;
        text-align: center;
        padding: 8px 0;
        font-size: 12px;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-card h3, .chart-container h2 {
        font-size: 1rem;
    }

    .chart-container {
        padding: 15px;
        margin-top: 20px;
    }

    .heatmap-container {
        padding: 15px;
    }

    .heatmap-stats {
        flex-direction: column;
        gap: 8px;
        font-size: 0.85rem;
    }

    .heatmap-grid {
        gap: 4px;
    }

    .heat-square {
        width: 14px;
        height: 14px;
    }

    .achievement-container {
        padding: 15px;
    }

    #achievementGrid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .reminder-container {
        padding: 15px;
    }

    #ai-section {
        padding: 12px;
        margin-top: 20px;
    }

    #ai-section h1 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .ai-card {
        padding: 15px;
        gap: 10px;
    }

    .ai-card input, .ai-card select {
        padding: 10px;
        font-size: 14px;
    }

    .ai-card button {
        padding: 10px;
        font-size: 14px;
    }

.streak-card {
    font-size: 1rem;
    padding: 15px;
    width: 100%;
}

}

@media screen and (max-width: 480px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        padding: 10px;
    }

    .sidebar {
        width: 100%;
        padding: 10px;
    }

    .sidebar h1 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .sidebar ul a {
        padding: 6px 10px;
        font-size: 11px;
    }

    header {
        padding: 12px;
    }

    header h2 {
        font-size: 18px;
    }

    header p {
        font-size: 12px;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        padding: 12px;
    }

    .card h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .dashboard-content {
        font-size: 13px;
    }

    .stat-card, .stat-card1 {
        padding: 10px;
        font-size: 12px;
    }

    .stat-card h3, .stat-card1 h3 {
        font-size: 12px;
    }

    .stat-card p, .stat-card1 p {
        font-size: 16px;
    }

    .task-section {
        padding: 10px;
    }

    .task-input {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }

    .task-input input, .task-input button {
        padding: 10px;
        font-size: 14px;
    }

    .task-list {
        gap: 8px;
    }

    .task-item {
        padding: 10px;
        gap: 8px;
    }

    .task-item h4 {
        font-size: 13px;
    }

    .task-item button {
        padding: 4px 8px;
        font-size: 11px;
    }

    .timetable-section {
        padding: 10px;
    }

    .timetable-inputs {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .timetable-inputs input, .timetable-inputs button {
        padding: 10px;
        font-size: 14px;
    }

    .class-list {
        gap: 8px;
    }

    .timer-section {
        padding: 10px;
    }

    .timer-display {
        font-size: 48px;
        padding: 20px;
    }

    .timer-buttons button {
        padding: 10px 16px;
        font-size: 12px;
    }

    .exam-section {
        padding: 10px;
    }

    .exam-inputs {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .exam-inputs input, .exam-inputs button {
        padding: 10px;
        font-size: 14px;
    }

    .modal {
        width: 90%;
        padding: 15px;
    }

    .login-box {
        width: 90%;
        padding: 15px;
    }

    .login-box h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .login-box input {
        padding: 11px;
        font-size: 15px;
        margin-bottom: 10px;
    }

    .login-box button {
        padding: 11px;
        font-size: 14px;
    }

    .profile-header {
        flex-direction: column;
        gap: 15px;
        padding: 12px;
    }

    .profile-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-pic {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }

    .profile-left h1 {
        font-size: 16px;
    }

    .profile-email {
        font-size: 12px;
    }

    .profile-right {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .profile-badge {
        padding: 8px 12px;
        font-size: 12px;
    }

    #ai-section {
        padding: 10px;
    }

    #ai-section h1 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .ai-card {
        padding: 12px;
        gap: 8px;
        display: flex;
        flex-direction: column;
    }

    .ai-card input, .ai-card select {
        padding: 8px;
        font-size: 13px;
    }

    .ai-card button {
        padding: 8px;
        font-size: 12px;
    }

    .streak-card {
        font-size: 0.9rem;
        padding: 12px;
    }

    .notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
        font-size: 12px;
        padding: 12px;
    }

    .weekly-overview {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .weekly-card {
        padding: 12px;
    }
}

@media screen and (max-width: 360px) {
    .sidebar h1 {
        font-size: 14px;
    }

    .sidebar ul a {
        padding: 5px 8px;
        font-size: 10px;
    }

    header h2 {
        font-size: 16px;
    }

    .timer-display {
        font-size: 40px;
        padding: 15px;
    }

    .login-box {
        width: 95%;
        padding: 12px;
    }

    .login-box h1 {
        font-size: 18px;
    }
}
