:root {
            --primary-color: #a29bfe;
            --secondary-color: #6c5ce7;
            --accent-color: #2d3748;
            --text-color: #f5f7fa;
            --light-text: #f5f7fa;
            --shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
            --bg-color: #1a202c;
            --card-color: #2d3748;


            
           
        }

        .dark-mode {
            --primary-color: #6c5ce7;
            --secondary-color: #a29bfe;
            --accent-color: #f5f7fa;
            --text-color: #2d3436;
            --light-text: #fff;
            --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
            --bg-color: #f5f7fa;
            --card-color: #ffffff;
            
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Tajawal', sans-serif;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        body {
            background: var(--bg-color);
            min-height: 100vh;
            color: var(--text-color);
            direction: rtl;
        }

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

        header {
            text-align: center;
            margin-bottom: 3rem;
            animation: fadeIn 1s ease;
        }

        h1 {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            position: relative;
            display: inline-block;
        }

        h1::after {
            content: '';
            position: absolute;
            bottom: -10px;
            right: 0;
            width: 50%;
            height: 4px;
            background: var(--secondary-color);
            border-radius: 2px;
        }

        .description {
            font-size: 1.1rem;
            color: var(--text-color);
            max-width: 700px;
            margin: 0 auto;
            line-height: 1.6;
            opacity: 0.9;
        }

        .class-selector {
            background: var(--card-color);
            border-radius: 15px;
            padding: 2rem;
            box-shadow: var(--shadow);
            margin-bottom: 3rem;
            animation: slideUp 0.8s ease;
        }

        .selector-title {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .selector-title i {
            color: var(--secondary-color);
        }

        .grade-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            justify-content: center;
        }

        .grade-btn {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: 50px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
            position: relative;
            overflow: hidden;
        }

        .grade-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(108, 92, 231, 0.4);
        }

        .grade-btn::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 1;
        }

        .grade-btn:hover::after {
            opacity: 1;
        }

        .grade-btn span {
            position: relative;
            z-index: 2;
        }

        .timetable-display {
            background: var(--card-color);
            border-radius: 15px;
            padding: 2rem;
            box-shadow: var(--shadow);
            text-align: center;
            display: none;
            animation: fadeIn 0.8s ease;
        }

        .timetable-title {
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
            color: var(--primary-color);
        }

        .timetable-image-container {
            position: relative;
            margin: 0 auto;
            max-width: 800px;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }

        .dark-mode .timetable-image-container {
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .timetable-image {
            width: 100%;
            height: auto;
            display: block;
            transition: transform 0.3s ease;
        }

        .timetable-image:hover {
            transform: scale(1.02);
        }

        .back-btn {
            background: var(--accent-color);
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
            padding: 0.8rem 1.5rem;
            border-radius: 50px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 1.5rem;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .back-btn:hover {
            background: var(--primary-color);
            color: white;
        }

        .theme-toggle {
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: var(--primary-color);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            z-index: 100;
            border: none;
        }

        footer {
            text-align: center;
            margin-top: 3rem;
            color: var(--text-color);
            font-size: 0.9rem;
            opacity: 0.8;
        }

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

        @keyframes slideUp {
            from { 
                opacity: 0;
                transform: translateY(30px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }
        @media (max-width: 768px) {
            .container {
                padding: 1rem;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .grade-buttons {
                flex-direction: column;
            }
            
            .grade-btn {
                width: 100%;
            }
        }
