:root {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: #333;
    --text-secondary: #555;
    --text-light: #666;
    --border-color: #e1e1e1;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    --chart-bg: #f8f9fa;
    --accent-color: #667eea;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --backdrop-blur: blur(10px);
}

[data-theme="dark"] {
    --bg-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    --card-bg: rgba(44, 62, 80, 0.9);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-light: #95a5a6;
    --border-color: #34495e;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --chart-bg: #34495e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    position: relative;
}

.header-controls {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Enhanced glassmorphism card styles */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.card.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: var(--backdrop-blur);
    backdrop-filter: var(--backdrop-blur);
}

.form-section h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Enhanced input styling */
.input-group input, .input-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.calculate-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 25px;
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
}

.results {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.hidden {
    display: none;
}

.current-stats h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Enhanced prediction card */
.prediction-card {
    background: linear-gradient(135deg, var(--success-color) 0%, #34d399 100%);
    color: white;
    padding: 25px;
    border-radius: 16px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.prediction-card.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #fbbf24 100%);
}

.prediction-card.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #f87171 100%);
}

.prediction-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

.prediction-header h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.prediction-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.progress-section {
    margin-bottom: 30px;
}

.progress-section h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.progress-bar {
    position: relative;
    background: #e9ecef;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.scenarios h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.scenario-card {
    background: var(--chart-bg);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #6c757d;
    transition: all 0.3s ease;
}

.scenario-card h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.scenario-card p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.scenario-card.good {
    border-left-color: #28a745;
    background: #f8fff9;
}

.scenario-card.warning {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.scenario-card.danger {
    border-left-color: #dc3545;
    background: #fff8f8;
}

.chart-section {
    margin-bottom: 30px;
}

.chart-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.chart-container {
    background: var(--chart-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    height: 400px;
    position: relative;
}

.chart-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: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.current {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.legend-color.predicted {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.legend-color.minimum {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

/* AdSense Container Styles */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    min-height: 90px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ad-container:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ad-container::before {
    content: 'Advertisement';
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--border-color);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 1;
}

/* Banner Ad Styles */
.banner-ad {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

.bottom-banner {
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Sidebar Ad Styles */
.sidebar-ad {
    width: 100%;
    max-width: 300px;
    min-height: 250px;
    margin: 20px 0;
}

/* AdSense responsive styling */
.adsbygoogle {
    display: block;
    width: 100%;
    z-index: 2;
    position: relative;
}

/* Dark mode for ads */
[data-theme="dark"] .ad-container {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .ad-container::before {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Mobile ad adjustments */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
        padding: 8px;
        min-height: 70px;
    }
    
    .banner-ad {
        min-height: 70px;
    }
    
    .sidebar-ad {
        max-width: 100%;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .ad-container {
        margin: 10px 0;
        padding: 5px;
        min-height: 50px;
    }
    
    .banner-ad {
        min-height: 50px;
    }
    
    .sidebar-ad {
        min-height: 150px;
    }
    
    .ad-container::before {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

/* Animation for results appearing */
.results {
    animation: slideUp 0.5s ease-out;
}

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

/* Input validation styles */
.input-group input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.input-group input.valid {
    border-color: #28a745;
}

/* Loading state for button */
.calculate-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.calculate-btn.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* PWA Specific Styles */
.pwa-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.pwa-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.install-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.notification-btn.granted {
    background: rgba(40, 167, 69, 0.8);
    border-color: rgba(40, 167, 69, 0.9);
}

.offline-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 1000;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.offline-indicator.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-50px);
    pointer-events: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 15px 25px;
    border-radius: 25px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.toast-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.toast-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

.toast-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

/* PWA Display Mode Styles */
@media (display-mode: standalone) {
    body {
        padding-top: 40px; /* Account for status bar */
    }
    
    .header-controls {
        top: 20px; /* Adjust for standalone mode */
    }
    
    .install-btn {
        display: none !important; /* Hide install button when installed */
    }
}

/* Mobile PWA Optimizations */
@media (max-width: 768px) {
    .pwa-btn {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .header-controls {
        right: 10px;
        top: 10px;
    }
    
    .offline-indicator {
        top: 10px;
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .toast {
        bottom: 20px;
        max-width: 95%;
        font-size: 0.9rem;
    }
}

/* Dark mode for PWA elements */
[data-theme="dark"] .offline-indicator {
    background: #e74c3c;
}

[data-theme="dark"] .pwa-btn {
    background: rgba(236, 240, 241, 0.1);
    border-color: rgba(236, 240, 241, 0.2);
}

[data-theme="dark"] .pwa-btn:hover {
    background: rgba(236, 240, 241, 0.2);
}

/* Splash Screen Simulation */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.splash-screen.show {
    opacity: 1;
    pointer-events: all;
}

.splash-logo {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.splash-text {
    font-size: 1.5rem;
    font-weight: 600;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-30px,0);
    }
    70% {
        transform: translate3d(0,-15px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Offline Data Banner */
.offline-data-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.offline-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.offline-banner-content i {
    font-size: 1.2rem;
}

.load-offline-btn, .dismiss-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.load-offline-btn:hover, .dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dismiss-btn {
    padding: 8px 12px;
    font-size: 1.2rem;
    font-weight: bold;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Help text styles */
.help-text {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
    line-height: 1.4;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus improvements for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Footer navigation styles */
footer nav ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin-top: 15px;
    padding: 0;
}

footer nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

footer nav a:hover,
footer nav a:focus {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Improved form accessibility */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* AdSense container improvements */
.ad-container {
    margin: 20px 0;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --card-bg: rgba(255, 255, 255, 1);
        --border-color: #000;
        --shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    }
    
    [data-theme="dark"] {
        --card-bg: rgba(0, 0, 0, 1);
        --border-color: #fff;
        --text-primary: #fff;
        --text-secondary: #ccc;
    }
}

/* Subjects Management Section */
#subjects-section {
    margin-bottom: 30px;
}
#subjects-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
#subjects-list {
    margin-bottom: 15px;
}
.subject-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--chart-bg);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}
.subject-item.selected {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.subject-actions button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s;
}
.subject-actions button:hover {
    color: var(--danger-color);
}
.add-subject-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 5px;
    transition: background 0.2s;
}
.add-subject-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
#subject-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.save-subject-btn, .cancel-subject-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    transition: background 0.2s;
}
.cancel-subject-btn {
    background: #e74c3c;
}
.save-subject-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
.cancel-subject-btn:hover {
    background: #c0392b;
}

/* Grades Tracker Section */
#grades-section {
    margin-bottom: 30px;
}
#grades-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
#grades-list {
    margin-bottom: 15px;
}
.grade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--chart-bg);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}
.grade-actions button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s;
}
.grade-actions button:hover {
    color: var(--danger-color);
}
.add-grade-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 5px;
    transition: background 0.2s;
}
.add-grade-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
#grade-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.save-grade-btn, .cancel-grade-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    transition: background 0.2s;
}
.cancel-grade-btn {
    background: #e74c3c;
}
.save-grade-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
.cancel-grade-btn:hover {
    background: #c0392b;
}
.grades-summary {
    margin-top: 15px;
    padding: 12px 18px;
    background: var(--glass-bg);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    border: 1px solid var(--glass-border);
}

/* Timetable Section */
#timetable-section {
    margin-bottom: 30px;
}
#timetable-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
#timetable-list {
    margin-bottom: 15px;
}
.timetable-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--chart-bg);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}
.timetable-actions button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s;
}
.timetable-actions button:hover {
    color: var(--danger-color);
}
.add-timetable-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 5px;
    transition: background 0.2s;
}
.add-timetable-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
#timetable-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.save-timetable-btn, .cancel-timetable-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    transition: background 0.2s;
}
.cancel-timetable-btn {
    background: #e74c3c;
}
.save-timetable-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
.cancel-timetable-btn:hover {
    background: #c0392b;
}

/* Reminders Section */
#reminders-section {
    margin-bottom: 30px;
}
#reminders-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
#reminders-list {
    margin-bottom: 15px;
}
.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--chart-bg);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}
.reminder-actions button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s;
}
.reminder-actions button:hover {
    color: var(--danger-color);
}
.add-reminder-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 5px;
    transition: background 0.2s;
}
.add-reminder-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
#reminder-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.save-reminder-btn, .cancel-reminder-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    transition: background 0.2s;
}
.cancel-reminder-btn {
    background: #e74c3c;
}
.save-reminder-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
.cancel-reminder-btn:hover {
    background: #c0392b;
}

/* Attendance Rules Section */
#attendance-rules-section {
    margin-bottom: 30px;
}
#attendance-rules-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}
#attendance-components-list {
    margin-bottom: 15px;
}
.component-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--chart-bg);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}
.component-actions button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s;
}
.component-actions button:hover {
    color: var(--danger-color);
}
.add-component-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 5px;
    transition: background 0.2s;
}
.add-component-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
#component-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.save-component-btn, .cancel-component-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    transition: background 0.2s;
}
.cancel-component-btn {
    background: #e74c3c;
}
.save-component-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, var(--accent-color) 100%);
}
.cancel-component-btn:hover {
    background: #c0392b;
}










