@font-face {
    font-family: 'OldEnglish';
    src: url('fonts/UnifrakturMaguntia-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'DotMatrix';
}

@font-face {
    font-family: 'DotMatrixBold';
    src: url('fonts/DOTMBold.TTF') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* ===== CSS Variables for Theming ===== */
:root {
    /* Dark theme (default) */
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.2);
    --accent-color: #ff4444;
    --accent-hover: #ff6666;
    --success-color: #4CAF50;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --aura-opacity: 1;
}

[data-theme="light"] {
    /* Light theme */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-input: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1a1a;
    --text-secondary: #444444;
    --text-muted: #666666;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-light: rgba(0, 0, 0, 0.15);
    --accent-color: #d32f2f;
    --accent-hover: #b71c1c;
    --success-color: #388E3C;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --aura-opacity: 0.3;
}

/* Theme toggle button */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for all browsers */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(ellipse 800px 600px at 30% 70%, rgba(255, 68, 68, 0.25) 0%, rgba(255, 102, 102, 0.15) 30%, rgba(204, 51, 51, 0.08) 60%, transparent 100%),
        radial-gradient(ellipse 600px 800px at 70% 30%, rgba(220, 20, 60, 0.2) 0%, rgba(255, 68, 68, 0.12) 35%, rgba(139, 0, 0, 0.06) 65%, transparent 100%),
        radial-gradient(ellipse 1000px 400px at 50% 80%, rgba(178, 34, 34, 0.18) 0%, rgba(255, 69, 0, 0.1) 40%, transparent 100%);
    animation: smoothAura 35s ease-in-out infinite;
    z-index: -2;
    pointer-events: none;
    filter: blur(1px);
    opacity: var(--aura-opacity);
    transition: opacity 0.3s ease;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(ellipse 700px 900px at 80% 20%, rgba(255, 102, 102, 0.15) 0%, rgba(220, 20, 60, 0.08) 45%, transparent 100%),
        radial-gradient(ellipse 900px 500px at 20% 60%, rgba(139, 0, 0, 0.12) 0%, rgba(178, 34, 34, 0.06) 50%, transparent 100%),
        radial-gradient(ellipse 500px 700px at 60% 90%, rgba(255, 69, 0, 0.1) 0%, rgba(255, 68, 68, 0.05) 55%, transparent 100%);
    animation: smoothAura2 45s ease-in-out infinite reverse;
    z-index: -1;
    pointer-events: none;
    filter: blur(2px);
    opacity: var(--aura-opacity);
    transition: opacity 0.3s ease;
}

@keyframes smoothAura {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(-5px, 8px) rotate(1deg) scale(1.02);
        opacity: 0.9;
    }
    50% {
        transform: translate(8px, -5px) rotate(-1deg) scale(0.98);
        opacity: 1;
    }
    75% {
        transform: translate(-3px, 3px) rotate(0.5deg) scale(1.01);
        opacity: 0.85;
    }
}

@keyframes smoothAura2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.7;
    }
    33% {
        transform: translate(6px, -8px) rotate(-0.8deg) scale(1.03);
        opacity: 0.85;
    }
    66% {
        transform: translate(-8px, 6px) rotate(0.8deg) scale(0.97);
        opacity: 0.9;
    }
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
    transform: translateX(0);
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar.hidden {
    transform: translateX(-250px);
}

.sidebar-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: auto;
}

.sidebar-toggle-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-toggle-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.sidebar-toggle-btn:active {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(0.95);
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-close:active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: scale(0.95);
}

.sidebar-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 500;
}



.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.sidebar-section:hover h4 {
    color: var(--accent-color);
}

.analysis-btn {
    display: block;
    width: 100%;
    background-color: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 15px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.analysis-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.2), transparent);
    transition: left 0.6s ease;
}

.analysis-btn:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.analysis-btn:hover::before {
    left: 100%;
}

.analysis-btn:active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    transform: translateX(6px) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

/* Special styling for the momentum tracker button */
.analysis-btn.momentum-tracker {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
}

.analysis-btn.momentum-tracker::before {
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.3), transparent);
}

.analysis-btn.momentum-tracker:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.1));
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    color: #4CAF50;
}

/* Special styling for the recall program button */
.analysis-btn.recall-program {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1), rgba(156, 39, 176, 0.05));
}

.analysis-btn.recall-program::before {
    background: linear-gradient(90deg, transparent, rgba(156, 39, 176, 0.3), transparent);
}

.analysis-btn.recall-program:hover {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.1));
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
    color: #9C27B0;
}

.main-container {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    max-width: calc(100vw - 250px);
    transition: all 0.3s ease;
    overflow: visible;
}

.main-container.sidebar-hidden {
    margin-left: 80px;
    margin-right: 80px;
    max-width: calc(100vw - 160px);
    padding: 30px 40px;
}

.main-container header {
    text-align: center;
    margin-bottom: 30px;
}

.main-container header h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 300;
}

.stats-display {
    margin-bottom: 20px;
}

.average-time {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-family: 'DotMatrix', monospace;
    letter-spacing: 2px;
}

.time-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 5px;
    font-family: 'DotMatrixBold', 'DotMatrix', monospace;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.time-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-family: 'DotMatrix', monospace;
    letter-spacing: 1px;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
    overflow: visible;
}

.chart-section {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: visible;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.nav-btn:active {
    background-color: var(--bg-tertiary);
    transform: scale(0.95);
}

.chart-container {
    height: 250px;
    margin-bottom: 15px;
}

.period-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
}

 .period-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden; /* Keep shine effect contained */
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    will-change: transform;
}

.period-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -85%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.45s ease;
}

.period-btn:hover {
    transform: translateY(-3px);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.period-btn:hover::before {
    left: 120%;
}

.period-btn.active {
    background-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-2px); /* Give active button a slight lift too */
    border-color: var(--accent-color);
}

.period-btn:active {
    transform: scale(0.95); /* Keep the press-down effect */
    background-color: var(--accent-hover);
    color: #ffffff;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .period-btn, .period-btn::before {
        transition: none !important;
        animation: none !important;
    }
}

.overall-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.expand-btn {
    background-color: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.expand-btn:active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: scale(0.95);
}

.months-display {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.subjects-section {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 35px;
    overflow: visible;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.subjects-section:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .subjects-section {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .subjects-section:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}

.subjects-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-primary);
}

.pie-chart-container {
    height: 200px;
    margin-bottom: 15px;
    overflow: visible;
    position: relative;
    z-index: 100;
}

.pie-chart-container canvas {
    overflow: visible;
    position: relative;
    z-index: 100;
}

.subject-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subject-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.subject-time {
    font-weight: bold;
    min-width: 80px;
    color: var(--text-primary);
}

.subject-label {
    color: var(--text-secondary);
}

/* Input sections wrapper for side-by-side layout */
.input-sections-wrapper {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.input-section {
    flex: 1;
    position: relative;
    z-index: 1;
}

.input-section.add-session-section,
.input-section.manage-subjects-section {
    flex: 1;
    min-width: 0; /* Allow flex items to shrink below their content size */
    z-index: 10; /* Higher z-index for sections with time pickers */
}

.input-section.recent-sessions-section {
    display: block; /* Full width for recent sessions */
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    width: 50%; /* Match the green border size */
    max-width: 600px; /* Prevent it from getting too wide */
}

.form-group {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-group h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-primary);
}

/* Collapsible Section Styles */
.collapsible-section {
    width: 100%;
}

.collapsible-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 400;
    user-select: none;
    transition: color 0.3s ease;
    color: var(--text-primary);
}

.collapsible-header.h4,
h4.collapsible-header {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.collapsible-header:hover {
    color: var(--accent-color);
}

.collapsible-content {
    display: none;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

.study-form,
.subject-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.study-form select,
.study-form input,
.subject-form input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Ensure date inputs show the native date picker */
.study-form input[type="date"] {
    background-color: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
}

.study-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

[data-theme="light"] .study-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}

/* Custom Date Picker Styling */
.date-picker-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-date-input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 40px 12px 12px;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s ease;
}

.custom-date-input:focus,
.custom-date-input:hover {
    border-color: #ff4444;
    outline: none;
}

.date-picker-container::after {
    content: '📅';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #ff4444;
    font-size: 16px;
    z-index: 1;
}

.date-picker {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 2px solid #ff4444;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
    z-index: 1000;
    display: none;
    padding: 12px;
    margin-top: 4px;
    max-width: 280px;
}

.date-picker.show {
    display: block;
    animation: datePickerSlideIn 0.3s ease;
}

@keyframes datePickerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #4a4a4a;
}

.date-picker-nav {
    background: #000000;
    border: 1px solid #4a4a4a;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 14px;
}

.date-picker-nav:hover {
    background: #ff4444;
    border-color: #ff4444;
    transform: translateY(-1px);
}

.date-picker-title {
    color: #ff4444;
    font-weight: bold;
    font-size: 1rem;
}

.date-picker-calendar {
    width: 100%;
}

.date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}

.date-picker-weekday {
    padding: 4px 2px;
    text-align: center;
    font-size: 0.7rem;
    color: #888;
    font-weight: bold;
}

.date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date-picker-day {
    padding: 6px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    font-size: 0.85rem;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-picker-day:hover {
    background: #4a4a4a;
    transform: scale(1.05);
}

.date-picker-day.other-month {
    color: #666;
}

.date-picker-day.selected {
    background: #ff4444;
    color: #ffffff;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.date-picker-day.today {
    border: 1px solid #ff4444;
    color: #ff4444;
}

.date-picker-day.today.selected {
    background: #ff4444;
    color: #ffffff;
    border: 1px solid #ffffff;
}

/* Custom Time Picker Styling */
.time-picker-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-time-input {
    background-color: #020101;
    border: 1px solid #100a0a;
    color: #ffffff;
    padding: 8px 30px 8px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
    position: relative;
    transition: border-color 0.3s ease;
}

.custom-time-input:focus,
.custom-time-input:hover {
    border-color: #ff4444;
    outline: none;
}

.time-picker-container::after {
    content: '🕐';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #ff4444;
    font-size: 14px;
    z-index: 1;
}

.time-picker {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 2px solid #ff4444;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.25);
    z-index: 9999;
    display: none;
    padding: 15px;
    margin-top: 2px;
    min-width: 240px;
}

.time-picker.show {
    display: block;
    animation: timePickerSlideIn 0.3s ease;
}

@keyframes timePickerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time-picker-content {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.hour-wheel-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.minute-slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-section-title {
    color: #ff4444;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

.hour-wheel {
    height: 120px;
    width: 70px;
    overflow-y: auto;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    background: #2a2a2a;
    scroll-snap-type: y mandatory;
    scrollbar-width: thin;
    scrollbar-color: #ff4444 #2a2a2a;
}

.hour-wheel::-webkit-scrollbar {
    width: 6px;
}

.hour-wheel::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 3px;
}

.hour-wheel::-webkit-scrollbar-thumb {
    background: #ff4444;
    border-radius: 3px;
}

.hour-item {
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    scroll-snap-align: center;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
}

.hour-item:hover {
    background: #3a3a3a;
    color: #fff;
}

.hour-item.selected {
    background: #ff4444;
    color: #ffffff;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

.minute-slider-section {
    width: 100%;
    padding: 10px 0;
}

.minute-display {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 10px;
    min-height: 25px;
}

.minute-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #4a4a4a;
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.minute-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff4444;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.5);
    transition: all 0.3s ease;
}

.minute-slider::-webkit-slider-thumb:hover {
    background: #ff6666;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.7);
}

.minute-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
}

.minute-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
}

.time-picker-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #4a4a4a;
}

.time-picker-btn {
    background: #2a2a2a;
    border: 1px solid #4a4a4a;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.time-picker-btn:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: #fff;
}

.time-picker-btn.primary {
    background: #ff4444;
    border-color: #ff4444;
    color: #ffffff;
}

.time-picker-btn.primary:hover {
    background: #ff6666;
}

.study-form select:focus,
.study-form input:focus,
.subject-form input:focus {
    outline: none;
    border-color: #ff4444;
}

.study-form button,
.subject-form button {
    background-color: #ff4444;
    border: none;
    color: #ffffff;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.study-form button:active,
.subject-form button:active {
    background-color: #ff6666;
    transform: scale(0.98);
}

.subject-list {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
}

.subject-list h4 {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.subjects-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #000000;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subject-info .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.subject-info .subject-name {
    color: #ffffff;
    font-size: 0.9rem;
}

.remove-btn {
    background-color: #ff4444;
    border: none;
    color: #ffffff;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:active {
    background-color: #ff6666;
    transform: scale(0.95);
}

/* Hide scrollbar for subjects container */
.subjects-container {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.subjects-container::-webkit-scrollbar {
    display: none;
}

/* Analysis Pages Styles */
.analysis-page {
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-header {
    background-color: var(--bg-secondary);
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.back-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: inline-block;
    transition: color 0.3s ease;
}

.back-btn:active {
    color: var(--accent-hover);
}

.analysis-page .page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    color: var(--text-primary);
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.analysis-page .analysis-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.stats-overview {
    margin-bottom: 40px;
}

.stats-overview .stat-card {
    background-color: var(--bg-tertiary);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.analysis-page .chart-section {
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.analysis-page .chart-section h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
}

.analysis-page .analysis-page .chart-container {
    height: 400px;
}

/* Study Progress Line Chart */
.line-chart-container {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    height: 350px;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.line-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chart-period-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-period-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.2), transparent);
    transition: left 0.5s ease;
}

.chart-period-btn:hover {
    background: #3a3a3a;
    border-color: #ff4444;
    color: #fff;
    transform: translateY(-2px);
}

.chart-period-btn:hover::before {
    left: 100%;
}

.chart-period-btn.active {
    background: #ff4444;
    border-color: #ff4444;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.chart-period-btn:active {
    transform: scale(0.98);
}

.section-description {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.detailed-breakdown, .trends-details {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
}

.subjects-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subject-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px 80px;
    align-items: center;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 8px;
    gap: 15px;
}

.rank {
    font-weight: bold;
    color: #ff4444;
    font-size: 1.1rem;
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hours {
    font-weight: bold;
    color: #ffffff;
    text-align: right;
}

.percentage {
    color: #ccc;
    text-align: right;
    font-size: 0.9rem;
}

/* Trends Page Styles */
.trends-overview {
    margin-bottom: 40px;
}

.trend-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.trend-card {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.trend-card.improving {
    border-left: 4px solid #4caf50;
}

.trend-card.declining {
    border-left: 4px solid #f44336;
}

.trend-card.stable {
    border-left: 4px solid #ffc107;
}

.trend-count {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.trend-icon {
    font-size: 1.5rem;
}

.trends-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #3a3a3a;
    border-radius: 10px;
}

.trend-item.up {
    border-left: 4px solid #4caf50;
}

.trend-item.down {
    border-left: 4px solid #f44336;
}

.trend-item.stable {
    border-left: 4px solid #ffc107;
}

.trend-subject h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.trend-indicator {
    color: #ccc;
    font-size: 0.9rem;
}

.trend-stats {
    text-align: right;
}

.current-avg {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.change.positive {
    color: #4caf50;
}

.change.negative {
    color: #f44336;
}

.change {
    font-size: 0.9rem;
}

/* Enhanced Subject Comparison Styles */
.selection-panel {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.selection-panel h2 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 400;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.subject-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.subject-card:active {
    transform: scale(0.98);
}

.subject-card.selected {
    border-color: #ff4444;
    background-color: #4a4a4a;
}

.subject-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
}

.subject-name {
    flex: 1;
    font-weight: 500;
    color: #ffffff;
}

.selection-indicator {
    color: #ff4444;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subject-card.selected .selection-indicator {
    opacity: 1;
}

.subject-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #ccc;
}

.selection-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    background-color: #3a3a3a;
    border: none;
    color: #ccc;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:active {
    transform: scale(0.95);
    background-color: #4a4a4a;
}

.action-btn.primary {
    background-color: #ff4444;
    color: #ffffff;
}

.action-btn.primary:active {
    background-color: #ff6666;
}

.comparison-results {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
}

.selected-count {
    color: #ff4444;
    font-weight: 500;
}

.visualization-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.circular-chart-container {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.chart-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.pie-chart-wrapper {
    position: relative;
    height: 300px;
    margin: 0 auto;
    overflow: visible;
}

/* Ensure Chart.js tooltips are not clipped */
.chartjs-tooltip {
    z-index: 1000 !important;
    pointer-events: none;
}

.chart-center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.total-hours {
    font-size: 2rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 5px;
}

.total-label {
    color: #ccc;
    font-size: 0.9rem;
}

.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card.highlight {
    border-left: 4px solid #ff4444;
}

.stat-icon {
    font-size: 1.8rem;
}

.stat-content h3 {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #ccc;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.stat-detail {
    font-size: 0.8rem;
    color: #888;
}

.detailed-breakdown, .insights-panel {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.detailed-breakdown h3, .insights-panel h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 400;
}

.breakdown-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-row {
    display: grid;
    grid-template-columns: 50px 2fr 100px 100px 1fr;
    align-items: center;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 8px;
    gap: 15px;
}

.breakdown-row .rank {
    font-weight: bold;
    color: #ff4444;
    font-size: 1.1rem;
}

.breakdown-row .subject-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breakdown-row .hours, .breakdown-row .percentage {
    font-weight: 500;
    text-align: center;
}

.breakdown-row .progress-bar {
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-row .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.insights-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 10px;
}

.insight-icon {
    font-size: 1.5rem;
    margin-top: 2px;
}

.insight-content h4 {
    margin-bottom: 5px;
    color: #ff4444;
    font-size: 1rem;
}

.insight-content p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Enhanced Trends Page Styles */
.trends-selection-panel {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.selection-section, .period-section {
    margin-bottom: 30px;
}

.selection-section h2, .period-section h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 400;
}

.subject-card.small {
    padding: 12px;
}

.subject-card.small .subject-name {
    font-size: 0.9rem;
}

.subject-card.small .subject-stats {
    font-size: 0.8rem;
}

.period-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.period-option {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.period-option:active {
    transform: scale(0.98);
}

.period-option.active {
    border-color: #ff4444;
    background-color: #4a4a4a;
}

.period-title {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 5px;
}

.period-desc {
    font-size: 0.8rem;
    color: #ccc;
}

.analyze-section {
    text-align: center;
}

.action-btn.large {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 500;
}

.trends-results {
    animation: fadeIn 0.5s ease-in;
}

.trend-card.new {
    border-left: 4px solid #4caf50;
}

.trend-content {
    text-align: center;
}

.trend-content h3 {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ccc;
}

.trend-count {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.trend-label {
    font-size: 0.8rem;
    color: #888;
}

.trends-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trend-row {
    display: grid;
    grid-template-columns: 2fr 60px 80px 80px 80px 1fr;
    align-items: center;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 8px;
    gap: 15px;
}

.trend-row.improving {
    border-left: 4px solid #4caf50;
}

.trend-row.declining {
    border-left: 4px solid #f44336;
}

.trend-row.stable {
    border-left: 4px solid #ffc107;
}

.trend-row .trend-subject {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trend-row .trend-indicator {
    font-size: 1.2rem;
    text-align: center;
}

.trend-row .current-hours,
.trend-row .previous-hours,
.trend-row .change-amount {
    text-align: center;
    font-weight: 500;
}

.trend-row .change-amount.positive {
    color: #4caf50;
}

.trend-row .change-amount.negative {
    color: #f44336;
}

.trend-row .progress-bar {
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.trend-row .progress-fill.current {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* Time Analysis Pages Styles */

/* Seasonal Analysis */
.seasonal-overview {
    margin-bottom: 40px;
}

.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.season-card {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.season-header {
    margin-bottom: 15px;
}

.season-emoji {
    font-size: 2rem;
    margin-bottom: 10px;
}

.season-stats {
    display: flex;
    justify-content: space-around;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff4444;
}

.stat-label {
    font-size: 0.8rem;
    color: #ccc;
}

.monthly-breakdown {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.month-card {
    background-color: #3a3a3a;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.month-name {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 5px;
}

.month-hours {
    font-weight: bold;
    color: #ffffff;
}

/* Weekday Analysis */
.weekday-overview {
    margin-bottom: 40px;
}

.comparison-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.day-type-card {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    min-width: 200px;
}

.day-type-card.weekday {
    border-left: 4px solid #4466ff;
}

.day-type-card.weekend {
    border-left: 4px solid #ff4444;
}

.card-header {
    margin-bottom: 15px;
}

.day-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.big-stat {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.total-hours {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

.vs-indicator {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff4444;
    background-color: #2a2a2a;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-breakdown {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.day-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.day-card.weekday {
    border-left: 3px solid #4466ff;
}

.day-card.weekend {
    border-left: 3px solid #ff4444;
}

.day-name {
    font-weight: bold;
    margin-bottom: 8px;
}

.day-hours {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.day-type {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 10px;
}

.day-bar {
    height: 6px;
    background-color: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

.day-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.rhythm-analysis {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.rhythm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.rhythm-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.rhythm-icon {
    font-size: 1.5rem;
}

.rhythm-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff4444;
}

.rhythm-detail {
    font-size: 0.8rem;
    color: #ccc;
}

/* Streak Analysis */
.streak-overview {
    margin-bottom: 40px;
}

.streak-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.streak-card {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.streak-card.current {
    border-left: 4px solid #ff4444;
}

.streak-card.best {
    border-left: 4px solid #ffd700;
}

.streak-card.month {
    border-left: 4px solid #4caf50;
}

.streak-card.total {
    border-left: 4px solid #2196f3;
}

.streak-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.streak-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.streak-label {
    font-size: 0.8rem;
    color: #ccc;
}

.calendar-section {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.calendar-container {
    margin-top: 20px;
}

.calendar-header {
    margin-bottom: 20px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #ccc;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-dot.no-study {
    background-color: #3a3a3a;
}

.legend-dot.light-study {
    background-color: #ffeb3b;
}

.legend-dot.medium-study {
    background-color: #ff9800;
}

.legend-dot.heavy-study {
    background-color: #4caf50;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    max-width: 400px;
    margin: 0 auto;
}

.day-label {
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
    padding: 5px;
    font-weight: bold;
}

.calendar-day {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calendar-day:hover {
    transform: scale(1.1);
}

.calendar-day.no-study {
    background-color: #3a3a3a;
    color: #666;
}

.calendar-day.light-study {
    background-color: #ffeb3b;
    color: #000;
}

.calendar-day.medium-study {
    background-color: #ff9800;
    color: #fff;
}

.calendar-day.heavy-study {
    background-color: #4caf50;
    color: #fff;
}

.streak-stats {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 1.8rem;
}

.stat-content h4 {
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 3px;
}

.stat-desc {
    font-size: 0.8rem;
    color: #888;
}

/* University Schedule Analysis Styles */
.day-configuration-section {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

/* Semester selector layout */
.semester-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.semester-selector label {
    color: #ccc;
    font-weight: 500;
}

.semester-selector select {
    background-color: #3a3a3a;
    border: 1px solid #555;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.save-config-btn {
    background-color: #4caf50;
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.save-config-btn:active {
    background-color: #45a049;
    transform: scale(0.98);
}

.days-configuration h3 {
    margin-bottom: 20px;
    color: #ffffff;
}

.days-grid-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.day-config-item {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.day-config-item .day-name {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1rem;
}

.day-toggle {
    display: flex;
    gap: 8px;
}

.day-type-btn {
    flex: 1;
    background-color: #555;
    border: none;
    color: #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.day-type-btn:active {
    transform: scale(0.95);
}

.day-type-btn.uni.active {
    background-color: #4caf50;
    color: #ffffff;
}

.day-type-btn.off.active {
    background-color: #ff9800;
    color: #ffffff;
}

.analysis-overview {
    margin-bottom: 40px;
}

.day-type-card.uni-days {
    border-left: 4px solid #4caf50;
}

.day-type-card.off-days {
    border-left: 4px solid #ff9800;
}

.historical-section, .current-week-section, .semester-comparison {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.week-day-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.week-day-card.uni-day {
    border-left: 4px solid #4caf50;
}

.week-day-card.off-day {
    border-left: 4px solid #ff9800;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.day-type-badge {
    font-size: 1.2rem;
}

.day-hours {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.day-status {
    font-size: 0.8rem;
    color: #ccc;
}

.semester-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.semester-stat-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.semester-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
}

.semester-metrics {
    display: flex;
    justify-content: space-around;
}

.metric {
    text-align: center;
}

.metric-label {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

.metric-value.uni {
    color: #4caf50;
}

.metric-value.off {
    color: #ff9800;
}

/* Semester Management Styles */
.mode-selection {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.mode-btn {
    background-color: #3a3a3a;
    border: none;
    color: #ccc;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.mode-btn:active {
    transform: scale(0.98);
}

.mode-btn.active {
    background-color: #ff4444;
    color: #ffffff;
}

.semester-section {
    animation: fadeIn 0.5s ease-in;
}

.semester-management {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.subjects-assignment {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

.unassigned-subjects {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.unassigned-subjects h4 {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 1rem;
}

.subjects-list {
    min-height: 200px;
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.subjects-list.drag-over {
    border-color: #ff4444;
    background-color: #4a4a4a;
}

.semesters-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.semester-group {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.semester-header h4 {
    color: #ffffff;
    font-size: 1.1rem;
}

.semester-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.subject-count {
    color: #ccc;
}

.total-hours {
    color: #ff4444;
    font-weight: bold;
}

.semester-subjects {
    min-height: 80px;
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.3s ease;
}

.semester-subjects.drag-over {
    border-color: #ff4444;
    background-color: #4a4a4a;
}

.subject-chip {
    background-color: #2a2a2a;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 4px solid #ff4444;
}

.subject-chip:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.subject-chip:hover {
    background-color: #4a4a4a;
    transform: translateY(-2px);
}

.subject-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.subject-hours {
    color: #ccc;
    font-size: 0.8rem;
    background-color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Semester-specific colors */
.semester-group[data-semester="Semester 1"] .semester-subjects {
    border-color: #4caf50;
}

.semester-group[data-semester="Semester 2"] .semester-subjects {
    border-color: #2196f3;
}

.semester-group[data-semester="Summer/Winter"] .semester-subjects {
    border-color: #ff9800;
}

.semester-group[data-semester="Semester 1"] .semester-subjects.drag-over {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

.semester-group[data-semester="Semester 2"] .semester-subjects.drag-over {
    border-color: #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
}

.semester-group[data-semester="Summer/Winter"] .semester-subjects.drag-over {
    border-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.subject-list {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
}

.subject-list h4 {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.subjects-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #000000;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subject-info .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.subject-info .subject-name {
    color: #ffffff;
    font-size: 0.9rem;
}

/* Analysis Modal Styles */
.analysis-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2a2a2a;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #3a3a3a;
}

.modal-header h3 {
    color: #ff4444;
    font-size: 1.3rem;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:active {
    background-color: #3a3a3a;
    color: #ffffff;
    transform: scale(0.95);
}

.modal-body {
    padding: 25px;
}

.analysis-content {
    color: #ffffff;
}

/* Analysis-specific styles */
.comparison-bar,
.trend-item,
.hour-bar,
.season-item,
.day-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 8px;
}

.bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.bar {
    height: 20px;
    border-radius: 10px;
    margin-right: 10px;
    min-width: 20px;
}

.comparison-stats,
.streak-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #3a3a3a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h5 {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.big-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background-color: #ff4444;
    transition: width 0.3s ease;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.calendar-day {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3a3a3a;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
}

.calendar-day.study-day {
    background-color: #ff4444;
    color: #ffffff;
}

.trend-indicator.up {
    color: #4caf50;
}

.trend-indicator.down {
    color: #f44336;
}

.trend-indicator {
    color: #ffc107;
}

.achievement-item,
.milestone-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 10px;
    margin-bottom: 10px;
}

.achievement-icon,
.milestone-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.milestone-item.achieved {
    border-left: 4px solid #4caf50;
}

/* Old English Title Styling */
.old-english-title {
    font-family: 'OldEnglish', cursive;
    font-size: 4rem;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .input-section {
        grid-template-columns: 1fr;
    }

    .chart-header {
        flex-direction: column;
        gap: 15px;
    }

    .period-selector {
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}
/* University Schedule Analysis Styles */
.day-configuration-section {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

/* Semester selector layout */
.semester-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.semester-selector label {
    color: #ccc;
    font-weight: 500;
}

.semester-selector select {
    background-color: #3a3a3a;
    border: 1px solid #555;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.save-config-btn {
    background-color: #4caf50;
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.save-config-btn:active {
    background-color: #45a049;
    transform: scale(0.98);
}

.days-configuration h3 {
    margin-bottom: 20px;
    color: #ffffff;
}

.days-grid-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.day-config-item {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.day-config-item .day-name {
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1rem;
}

.day-toggle {
    display: flex;
    gap: 8px;
}

.day-type-btn {
    flex: 1;
    background-color: #555;
    border: none;
    color: #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.day-type-btn:active {
    transform: scale(0.95);
}

.day-type-btn.uni.active {
    background-color: #4caf50;
    color: #ffffff;
}

.day-type-btn.off.active {
    background-color: #ff9800;
    color: #ffffff;
}

.analysis-overview {
    margin-bottom: 40px;
}

.day-type-card.uni-days {
    border-left: 4px solid #4caf50;
}

.day-type-card.off-days {
    border-left: 4px solid #ff9800;
}

.historical-section, .current-week-section, .semester-comparison {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.week-day-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.week-day-card.uni-day {
    border-left: 4px solid #4caf50;
}

.week-day-card.off-day {
    border-left: 4px solid #ff9800;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.day-type-badge {
    font-size: 1.2rem;
}

.day-hours {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.day-status {
    font-size: 0.8rem;
    color: #ccc;
}

.semester-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.semester-stat-card {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.semester-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
}

.semester-metrics {
    display: flex;
    justify-content: space-around;
}

.metric {
    text-align: center;
}

.metric-label {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

.metric-value.uni {
    color: #4caf50;
}

.metric-value.off {
    color: #ff9800;
}

/* Semester Management Styles */
.mode-selection {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.mode-btn {
    background-color: #3a3a3a;
    border: none;
    color: #ccc;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.mode-btn:active {
    transform: scale(0.98);
}

.mode-btn.active {
    background-color: #ff4444;
    color: #ffffff;
}

.semester-section {
    animation: fadeIn 0.5s ease-in;
}

.semester-management {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.subjects-assignment {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

.unassigned-subjects {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.unassigned-subjects h4 {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 1rem;
}

.subjects-list {
    min-height: 200px;
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.subjects-list.drag-over {
    border-color: #ff4444;
    background-color: #4a4a4a;
}

.semesters-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.semester-group {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.semester-header h4 {
    color: #ffffff;
    font-size: 1.1rem;
}

.semester-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.subject-count {
    color: #ccc;
}

.total-hours {
    color: #ff4444;
    font-weight: bold;
}

.semester-subjects {
    min-height: 80px;
    border: 2px dashed #555;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.3s ease;
}

.semester-subjects.drag-over {
    border-color: #ff4444;
    background-color: #4a4a4a;
}

.subject-chip {
    background-color: #2a2a2a;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 4px solid #ff4444;
}

.subject-chip:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.subject-chip:hover {
    background-color: #4a4a4a;
    transform: translateY(-2px);
}

.subject-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.subject-hours {
    color: #ccc;
    font-size: 0.8rem;
    background-color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Semester-specific colors */
.semester-group[data-semester="Semester 1"] .semester-subjects {
    border-color: #4caf50;
}

.semester-group[data-semester="Semester 2"] .semester-subjects {
    border-color: #2196f3;
}

.semester-group[data-semester="Summer/Winter"] .semester-subjects {
    border-color: #ff9800;
}

.semester-group[data-semester="Semester 1"] .semester-subjects.drag-over {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

.semester-group[data-semester="Semester 2"] .semester-subjects.drag-over {
    border-color: #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
}

.semester-group[data-semester="Summer/Winter"] .semester-subjects.drag-over {
    border-color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.subject-list {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
}

.subject-list h4 {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 400;
}

.subjects-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #000000;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subject-info .color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.subject-info .subject-name {
    color: #ffffff;
    font-size: 0.9rem;
}

/* Analysis Modal Styles */
.analysis-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2a2a2a;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #3a3a3a;
}

.modal-header h3 {
    color: #ff4444;
    font-size: 1.3rem;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:active {
    background-color: #3a3a3a;
    color: #ffffff;
    transform: scale(0.95);
}

.modal-body {
    padding: 25px;
}

.analysis-content {
    color: #ffffff;
}

/* Analysis-specific styles */
.comparison-bar,
.trend-item,
.hour-bar,
.season-item,
.day-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 8px;
}

.bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.bar {
    height: 20px;
    border-radius: 10px;
    margin-right: 10px;
    min-width: 20px;
}

.comparison-stats,
.streak-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: #3a3a3a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h5 {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.big-number {
    font-size: 2rem;
    color: #ff4444;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background-color: #ff4444;
    transition: width 0.3s ease;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.calendar-day {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3a3a3a;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
}

.calendar-day.study-day {
    background-color: #ff4444;
    color: #ffffff;
}

.trend-indicator.up {
    color: #4caf50;
}

.trend-indicator.down {
    color: #f44336;
}

.trend-indicator {
    color: #ffc107;
}

.achievement-item,
.milestone-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 10px;
    margin-bottom: 10px;
}

.achievement-icon,
.milestone-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.milestone-item.achieved {
    border-left: 4px solid #4caf50;
}

/* Old English Title Styling */
.old-english-title {
    font-family: 'OldEnglish', cursive;
    font-size: 4rem;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .input-section {
        grid-template-columns: 1fr;
    }

    .chart-header {
        flex-direction: column;
        gap: 15px;
    }

    .period-selector {
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}
/* ===== Recall Toggle in Add Session Form ===== */
.recall-toggle {
    margin: 12px 0;
}

.recall-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.recall-label input[type="checkbox"] {
    display: none;
}

.recall-slider {
    width: 40px;
    height: 22px;
    background: var(--bg-tertiary, #2a2a2a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 11px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.recall-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--text-muted, #888);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s, background 0.3s;
}

.recall-label input:checked + .recall-slider {
    background: rgba(156, 39, 176, 0.3);
    border-color: #9C27B0;
}

.recall-label input:checked + .recall-slider::after {
    transform: translateX(18px);
    background: #9C27B0;
}

.recall-text {
    font-size: 13px;
    color: var(--text-secondary, #ccc);
    font-weight: 500;
}
