/* ===== ROOT VARIABLES - MODERN & COLORFUL ===== */
:root {
    /* Backgrounds */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-accent: #e7f5ff;

    /* Accent Colors */
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-light: #e5deff;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;

    /* Border & Shadow */
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

    /* Status Colors */
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #f44336;
    --info: #2196F3;

    /* Subject Colors */
    --math: #FF6B6B;
    --physics: #4ECDC4;
    --chemistry: #95E1D3;
    --biology: #F38181;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* ===== APP CONTAINER ===== */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 10px var(--shadow);
}

.sidebar-header {
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.logo-text h2 {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-btn:hover {
    background: var(--bg-chat);
    border-color: var(--accent-primary);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.2);
}

.sidebar-btn .icon {
    font-size: 18px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.chat-header {
    padding: 30px 40px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chat-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== CHAT MESSAGES ===== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 15px;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message.ai .message-avatar {
    background: var(--accent-gradient);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.message.user .message-avatar {
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-secondary);
}

.message-content {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.message.ai .message-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px 16px 16px 4px;
}

.message.user .message-content {
    background: var(--accent-gradient);
    color: white;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 20px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ===== CHAT INPUT ===== */
.chat-input-container {
    padding: 20px 40px 30px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    max-height: 150px;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: var(--bg-chat);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ===== INTERACTIVE ELEMENTS ===== */
.subject-selector,
.option-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.option-card.selected {
    border-color: var(--accent-primary);
    background: rgba(108, 99, 255, 0.1);
}

.subject-input {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.subject-input input,
.subject-input select {
    background: var(--bg-chat);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.subject-input input {
    flex: 1;
}

.subject-input input:focus,
.subject-input select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn-add,
.btn-submit {
    padding: 12px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-remove {
    background: var(--error);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #dc2626;
}

/* ===== SCHEDULE MODAL ===== */
.schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.schedule-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border);
}

.schedule-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-modal {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--error);
    border-color: var(--error);
    transform: rotate(90deg);
}

.schedule-modal-body {
    overflow-y: auto;
    padding: 30px;
}

.schedule-modal-body::-webkit-scrollbar {
    width: 8px;
}

.schedule-modal-body::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.schedule-modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

/* ===== SCHEDULE DISPLAY ===== */
.week-section {
    margin-bottom: 30px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.week-section h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.day-schedule {
    margin-bottom: 20px;
    background: var(--bg-chat);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
}

.day-schedule h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-secondary);
}

.time-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.time-slot:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.2);
}

.time-slot.break {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.time-slot .time {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 14px;
    min-width: 120px;
}

.time-slot.break .time {
    color: var(--warning);
}

.time-slot .subject {
    flex: 1;
    margin: 0 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.time-slot .priority {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent-gradient);
    color: white;
}

.time-slot.break .priority {
    background: var(--warning);
}

/* ===== DETAIL PANEL ===== */
.detail-panel {
    width: 450px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.4s ease;
    z-index: 100;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

.detail-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.close-detail {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-detail:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
    transform: rotate(90deg);
}

.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.detail-body::-webkit-scrollbar {
    width: 6px;
}

.detail-body::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.detail-body::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-subtext {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Weekly Overview */
.weekly-overview {
    margin-bottom: 24px;
}

.weekly-overview h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.week-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.week-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

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

.week-item .week-title {
    font-weight: 600;
    color: var(--text-primary);
}

.week-item .week-badge {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.week-item .week-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subject-badge {
    background: var(--bg-chat);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.subject-badge.priority-high {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.subject-badge.priority-medium {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.subject-badge.priority-low {
    border-color: var(--text-muted);
    color: var(--text-muted);
}

/* Detailed Schedule in Panel */
.detailed-schedule {
    margin-top: 24px;
}

.detailed-schedule h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Adjust week-section for detail panel */
.detail-body .week-section {
    margin-bottom: 20px;
    padding: 16px;
}

.detail-body .week-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.detail-body .day-schedule {
    margin-bottom: 12px;
    padding: 12px;
}

.detail-body .day-schedule h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.detail-body .time-slot {
    padding: 8px 12px;
    margin: 6px 0;
    font-size: 13px;
}

.detail-body .time-slot .time {
    font-size: 12px;
    min-width: 90px;
}

.detail-body .time-slot .subject {
    font-size: 13px;
}

.detail-body .time-slot .priority {
    font-size: 10px;
    padding: 2px 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .chat-messages {
        padding: 20px;
    }

    .chat-input-container {
        padding: 15px 20px;
    }

    .message-content {
        max-width: 85%;
    }

    .quick-actions {
        flex-direction: column;
    }

    .schedule-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}

.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ==================== WELCOME SCREEN ==================== */

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    padding: 40px;
    text-align: center;
    overflow-y: auto;
}

.welcome-content::-webkit-scrollbar {
    width: 8px;
}

.welcome-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.welcome-content::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.welcome-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.welcome-content > p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    max-width: 600px;
}

.welcome-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.welcome-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.welcome-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.welcome-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.welcome-btn.secondary {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.welcome-btn.secondary:hover {
    background: #667eea;
    color: white;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
}

.feature-item {
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    border-color: var(--accent-primary);
}

.feature-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.feature-item p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }

    .welcome-actions {
        flex-direction: column;
        width: 100%;
    }

    .welcome-btn {
        width: 100%;
    }
}

/* ==================== SIDEBAR WIDGETS ==================== */

.sidebar-stats {
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    border: 1px solid var(--border-light);
}

.sidebar-stats h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.warning {
    color: var(--warning);
}

.sidebar-tips {
    background: var(--bg-accent);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border-left: 4px solid var(--info);
}

.sidebar-tips h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tip-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ==================== ENHANCED CHAT CONTAINER ==================== */

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ==================== ENHANCED WELCOME SCREEN ==================== */

.popular-subjects {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--border-light);
    text-align: center;
}

.popular-subjects h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.subject-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.subject-badge {
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.subject-badge.math {
    background: linear-gradient(135deg, #FF6B6B15, #FF6B6B25);
    color: #FF6B6B;
    border-color: #FF6B6B;
}

.subject-badge.physics {
    background: linear-gradient(135deg, #4ECDC415, #4ECDC425);
    color: #4ECDC4;
    border-color: #4ECDC4;
}

.subject-badge.chemistry {
    background: linear-gradient(135deg, #95E1D315, #95E1D325);
    color: #95E1D3;
    border-color: #95E1D3;
}

.subject-badge.biology {
    background: linear-gradient(135deg, #F3818115, #F3818125);
    color: #F38181;
    border-color: #F38181;
}

.subject-badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ==================== FEATURE TOOLTIP ==================== */

.feature-tooltip {
    position: fixed;
    background: white;
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 400px;
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.feature-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.feature-tooltip .tooltip-icon {
    font-size: 32px;
}

.feature-tooltip .tooltip-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.feature-tooltip .tooltip-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.feature-tooltip .tooltip-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-tooltip .tooltip-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
}

.feature-tooltip .tooltip-detail-item::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.feature-tooltip .tooltip-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.feature-tooltip .tooltip-close:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr 1fr;
    }

    .feature-tooltip {
        max-width: 90%;
        left: 5% !important;
        right: 5% !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/* ==================== LIFE MANAGER - HOME DASHBOARD ==================== */

.content-area {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-primary);
}

.category-content {
    min-height: 100%;
}

.home-dashboard {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.greeting h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.greeting p {
    font-size: 16px;
    color: var(--text-secondary);
}

.btn-add-quick {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-quick:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card, white);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Home Sections */
.home-section {
    margin-bottom: 32px;
}

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

.section-header h2,
.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-see-all {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-see-all:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Today Tasks List */
.today-tasks-list,
.upcoming-tasks-list,
.health-reminders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card, white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.home-task-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    transition: all 0.2s ease;
}

.task-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.task-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-title {
    font-size: 14px;
    color: var(--text-primary);
}

.task-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card, white);
    border-radius: 16px;
    border: 1px dashed var(--border);
}

.empty-state.mini {
    padding: 20px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Quick Add Menu */
.quick-add-menu {
    position: fixed;
    background: var(--bg-card, white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-light);
    z-index: 10000;
    overflow: hidden;
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-add-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.quick-add-item:hover {
    background: var(--bg-tertiary);
}

.quick-add-item .icon {
    font-size: 18px;
}

/* Program Cards (Study Section) */
.study-dashboard,
.health-dashboard,
.expenses-dashboard {
    padding: 32px;
}

.program-card {
    padding: 20px;
    background: var(--bg-card, white);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.program-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

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

.program-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.program-badge {
    padding: 4px 10px;
    background: var(--accent-primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.program-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .home-dashboard {
        padding: 20px;
    }

    .greeting h1 {
        font-size: 24px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .btn-add-quick {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}
