:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary: #00cec9;
    --danger: #ff7675;
    --warning: #fdcb6e;
    --dark: #2d3436;
    --darker: #1e272e;
    --light: #f5f6fa;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-highlight: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--darker), #000);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
}

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

/* Header Styles */
.hero-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    color: var(--primary-light);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: var(--glass);
    border-radius: 50px;
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--light);
    font-size: 1rem;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-bar button {
    background: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-bar button:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Subject Grid */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.subject-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
    background: var(--glass-highlight);
}

.card-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.subject-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.subject-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: white;
}

.subject-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.card-hover {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    color: white;
}

.subject-card:hover .card-hover {
    bottom: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.wide-modal {
    max-width: 800px;
}

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

.modal-icon {
    font-size: 3rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    color: white;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light);
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-glow {
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.8);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

.btn-danger:hover {
    background: #e84393;
}

.youtube-btn {
    background: #ff0000;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.youtube-btn:hover {
    background: #cc0000;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.3);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.input-with-icon input {
    padding-left: 3rem;
}

/* Units Accordion */
.units-accordion {
    margin-top: 1rem;
}

.unit-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.unit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.unit-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.unit-day {
    font-weight: bold;
    color: var(--primary-light);
    min-width: 60px;
}

.unit-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.unit-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.unit-item.active .unit-content {
    max-height: 1000px;
}

.unit-item.active .toggle-btn {
    transform: rotate(180deg);
}

/* Videos List */
.videos-list {
    padding: 0 1.5rem;
}

.video-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.video-info i {
    color: var(--primary);
    font-size: 1.2rem;
}

.video-info span {
    color: var(--light);
}

.play-btn {
    background: rgba(108, 92, 231, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

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

.add-video-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--glass-border);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.8rem;
    margin-top: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-video-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: var(--primary);
}

/* Video Player */
.video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Confirmation Dialog */
.confirmation-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

/* Navigation Footer */
.nav-footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.nav-btn {
    padding: 0.7rem 1.2rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.nav-btn.active {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary-light);
}

.nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-btn span {
    display: none;
}

@media (min-width: 768px) {
    .nav-btn span {
        display: inline;
    }
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2rem;
    }
    
    .subject-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .wide-modal {
        height: 80vh;
        overflow-y: auto;
    }
    
    .unit-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}