/* Gruvbox Color Palette */
:root {
    /* Gruvbox Dark Colors */
    --bg-dark: #282828;
    --bg-dark-soft: #32302f;
    --bg-dark-hard: #1d2021;
    --fg: #ebdbb2;
    --fg-dim: #a89984;
    
    /* Gruvbox Colors */
    --red: #cc241d;
    --green: #98971a;
    --yellow: #d79921;
    --blue: #458588;
    --purple: #b16286;
    --aqua: #689d6a;
    --orange: #d65d0e;
    
    /* Gruvbox Light variants */
    --red-light: #fb4934;
    --green-light: #b8bb26;
    --yellow-light: #fabd2f;
    --blue-light: #83a598;
    --purple-light: #d3869b;
    --aqua-light: #8ec07c;
    --orange-light: #fe8019;
    
    /* Additional colors */
    --gray-0: #928374;
    --gray-1: #7c6f64;
    --gray-2: #665c54;
    --gray-3: #504945;
    --gray-4: #3c3836;
    
    /* Shadows and effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark-hard) 0%, var(--bg-dark) 100%);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: var(--bg-dark-soft);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-4);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(235, 219, 178, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--yellow-light);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--fg-dim);
    font-weight: 400;
}

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Section styles */
.syllabus-section,
.mock-test-section {
    background: var(--bg-dark-soft);
    border-radius: var(--radius-lg);
    padding: 25px;
    border: 1px solid var(--gray-4);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    height: fit-content;
}

.syllabus-section:hover,
.mock-test-section:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-3);
}

/* Section headers */
.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-4);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Progress stats */
.progress-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* PYQ Stats */
.pyq-stats {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-4);
}

.pyq-stats h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pyq-stat .stat-value {
    color: var(--purple-light);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-4);
    min-width: 80px;
    transition: all var(--transition-fast);
}

.stat:hover {
    background: var(--gray-4);
    transform: translateY(-2px);
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--aqua-light);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--fg-dim);
    margin-top: 4px;
}

/* Syllabus content */
.syllabus-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.syllabus-content::-webkit-scrollbar {
    width: 6px;
}

.syllabus-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 3px;
}

.syllabus-content::-webkit-scrollbar-thumb {
    background: var(--gray-2);
    border-radius: 3px;
}

.syllabus-content::-webkit-scrollbar-thumb:hover {
    background: var(--gray-1);
}

/* Topic styles */
.topic {
    margin-bottom: 20px;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-4);
    overflow: hidden;
    transition: all var(--transition-medium);
}

.topic:hover {
    border-color: var(--gray-3);
    box-shadow: var(--shadow-sm);
}

.topic-header {
    padding: 15px 20px;
    background: var(--gray-4);
    border-bottom: 1px solid var(--gray-3);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
}

.topic-header:hover {
    background: var(--gray-3);
}

.topic-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-toggle {
    color: var(--fg-dim);
    transition: transform var(--transition-fast);
}

.topic.expanded .topic-toggle {
    transform: rotate(90deg);
}

.topic-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.topic.expanded .topic-content {
    max-height: 500px;
    padding: 15px 20px;
}

/* Subtopic styles */
.subtopic {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-4);
    transition: all var(--transition-fast);
}

.subtopic:last-child {
    border-bottom: none;
}

.subtopic:hover {
    background: var(--gray-4);
    margin: 10px -20px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.checkbox:hover {
    border-color: var(--aqua-light);
    box-shadow: 0 0 0 3px rgba(131, 165, 152, 0.1);
}

.checkbox:checked {
    background: var(--aqua-light);
    border-color: var(--aqua-light);
}

.checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bg-dark);
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--fg-dim);
    user-select: none;
    cursor: pointer;
}

.subtopic-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--fg);
    line-height: 1.5;
}

/* Mock test section */
.mock-test-form {
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--gray-4);
    animation: slideDown var(--transition-medium);
}

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

.mock-test-form h3 {
    color: var(--fg);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--fg);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark-soft);
    border: 1px solid var(--gray-4);
    border-radius: var(--radius-md);
    color: var(--fg);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(131, 165, 152, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--fg-dim);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    user-select: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    background: var(--blue-light);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--blue);
}

.btn-success {
    background: var(--green-light);
    color: var(--bg-dark);
}

.btn-success:hover {
    background: var(--green);
}

.btn-secondary {
    background: var(--gray-3);
    color: var(--fg);
}

.btn-secondary:hover {
    background: var(--gray-2);
}

.btn-danger {
    background: var(--red-light);
    color: var(--bg-dark);
}

.btn-danger:hover {
    background: var(--red);
}

/* Test stats */
.test-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    background: var(--bg-dark);
    padding: 20px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-4);
    text-align: center;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    background: var(--gray-4);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--yellow-light);
    margin-bottom: 5px;
}

.stat-desc {
    font-size: 0.85rem;
    color: var(--fg-dim);
}

/* Test list */
.test-list {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
}

.test-item {
    background: var(--bg-dark);
    border: 1px solid var(--gray-4);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    transition: all var(--transition-fast);
    animation: fadeInUp var(--transition-medium);
}

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

.test-item:hover {
    border-color: var(--gray-3);
    box-shadow: var(--shadow-sm);
}

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

.test-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
}

.test-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: var(--gray-4);
}

.test-score.excellent {
    background: var(--green);
    color: var(--bg-dark);
}

.test-score.good {
    background: var(--yellow);
    color: var(--bg-dark);
}

.test-score.average {
    background: var(--orange);
    color: var(--bg-dark);
}

.test-score.poor {
    background: var(--red);
    color: var(--fg);
}

.test-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.test-date {
    font-size: 0.9rem;
    color: var(--fg-dim);
}

.test-remarks {
    font-size: 0.9rem;
    color: var(--fg-dim);
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-4);
}

.delete-test {
    background: none;
    border: none;
    color: var(--red-light);
    cursor: pointer;
    padding: 5px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.delete-test:hover {
    background: var(--red-light);
    color: var(--bg-dark);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--fg-dim);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .progress-stats {
        justify-content: center;
    }
    
    .test-stats {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: auto;
    }
    
    .test-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .test-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .syllabus-section,
    .mock-test-section {
        padding: 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--fg-dim);
    border-top: 2px solid var(--aqua-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--blue-light);
    outline-offset: 2px;
}

.checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(131, 165, 152, 0.3);
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .mock-test-form,
    .btn {
        display: none;
    }
} 