:root {
    --primary: #FF6B6B;
    --primary-dark: #EE5A52;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --bg-dark: #1A1A2E;
    --bg-medium: #16213E;
    --bg-light: #0F3460;
    --text-primary: #FFFFFF;
    --text-secondary: #B8C1EC;
    --success: #51CF66;
    --warning: #FFD93D;
    --danger: #FF6B6B;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-light) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 230, 109, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

header {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #51CF66, #37B24D);
    color: white;
}

.subject-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.subject-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.subject-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.2);
}

.subject-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subject-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.subject-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.priority-high { background: rgba(255, 107, 107, 0.2); color: var(--danger); }
.priority-medium { background: rgba(255, 230, 109, 0.2); color: var(--warning); }
.priority-low { background: rgba(81, 207, 102, 0.2); color: var(--success); }

.subject-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.schedule-grid {
    display: grid;
    gap: 1rem;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.schedule-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.schedule-time {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.schedule-subject {
    font-weight: 600;
    font-size: 1.1rem;
}

.task-list {
    display: grid;
    gap: 1rem;
}

.task-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.task-item:hover {
    border-color: var(--secondary);
}

.task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.task-deadline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
}

.progress-container {
    margin: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s ease;
    border-radius: 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-medium);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 300px;
    margin-top: 1rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 20px;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: translateY(-5px);
}

.chart-label {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.settings-grid {
    display: grid;
    gap: 1.5rem;
}

.setting-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.setting-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.setting-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 34px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: rgb(223, 198, 198);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.day-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.day-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.day-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
}

select option {
    background-color: var(--bg-medium);
    color: var(--text-primary);
    padding: 10px;
}

select option:hover, 
select option:focus {
    background-color: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .subject-list {
        grid-template-columns: 1fr;
    }

    .week-days {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        padding: 0 1rem 1rem;
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: var(--bg-medium);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.success { border-color: var(--success); }
.notification.warning { border-color: var(--warning); }
.notification.danger { border-color: var(--danger); }

#confirmModal .modal-content {
    border: 2px solid var(--danger);
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.2);
}

#confirmModal .btn {
    flex: 1;
    justify-content: center;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.5s ease forwards;
}

.notification.warning {
    background: linear-gradient(135deg, #FFD93D, #FFA41B);
    color: #1a1a2e;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

body.light-theme {
    --bg-dark: #f8f9fa;
    --bg-medium: #ffffff;
    --bg-light: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --border: rgba(0, 0, 0, 0.1);
}

body.light-theme .nav-btn {
    color: var(--text-secondary);
}

body.light-theme .nav-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .nav-btn.active {
    color: #ffffff;
}

body.light-theme header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid var(--border);
}

body.light-theme::before {
    opacity: 0.05;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    height: 250px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}
.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: height 0.6s ease-out;
}
.bar-label {
    position: absolute;
    bottom: -30px;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: var(--bg-medium);
    color: var(--text-primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

.notification.success { border-color: var(--success); }
.notification.warning { border-color: var(--warning); }
.notification.danger { border-color: var(--danger); }

body.light-theme .notification {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
