/* ========================================
   RESET & 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, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    color: #fff;
    line-height: 1.6;
}

/* ========================================
   AUTH PAGES (Login)
   ======================================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    padding-top: 1rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-box .logo {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
    margin-bottom: -25px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-box h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-box h1 span{
    background:  linear-gradient(1.63rad, #ffffff 6.3%, #67527c);
/*	background:  linear-gradient(135deg, #667eea 0%, #764ba2 100%);	*/
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}






.auth-box .tagline {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-input {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

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

.auth-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    background: rgba(255, 107, 107, 0.1);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.auth-error.show {
    display: block;
}

.auth-switch {
    margin-top: 1.5rem;
}

/* ========================================
   MAIN APP CONTAINER
   ======================================== */
#app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}


.header-content h1 span {
	background: linear-gradient(93.39deg, #67527c, #ffffff);
/*	background:  linear-gradient(135deg, #667eea 0%, #764ba2 100%);	*/
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.header-content .tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.welcome-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.admin-btn, .logout-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

main h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.courses-intro {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

/* ========================================
   COURSES GRID
   ======================================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.course-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.course-card:hover::before {
    opacity: 1;
}

.course-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.course-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #fff;
}

.course-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.course-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.course-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.course-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================
   BACK BUTTON
   ======================================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

/* ========================================
   COURSE DETAIL PAGE
   ======================================== */
.course-detail-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.course-icon-large {
    font-size: 5rem;
}

.course-detail-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.course-detail-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ========================================
   LESSONS LIST
   ======================================== */
.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lesson-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateX(10px);
}

.lesson-item.completed {
    border-left: 4px solid #4caf50;
}

.lesson-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.lesson-item.completed .lesson-number {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.lesson-info {
    flex: 1;
}

.lesson-info h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #fff;
}

.lesson-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.lesson-status {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ========================================
   LESSON DETAIL PAGE
   ======================================== */
.lesson-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.lesson-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.lesson-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
}

/* Video Player */
.player-video-container {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.player-video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-watermark {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
    backdrop-filter: blur(10px);
}

/* Audio Player */
.audio-player-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.audio-player-container h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.audio-player-container audio {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.audio-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-link:hover {
    text-decoration: underline;
}

/* Lesson Text Content */
.lesson-text {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Lesson Navigation */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
}

.nav-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.prev-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prev-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* ========================================
   ADMIN - TABLE BUTTONS
   ======================================== */
.btn-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.btn-active:hover {
    background: #c3e6cb;
}

.btn-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-inactive:hover {
    background: #f5c6cb;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ========================================
   BUTTONS (GENERAL)
   ======================================== */
.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .header-content h1 {
        font-size: 1.4rem;
    }

    main {
        padding: 2rem 1rem;
    }

    main h2 {
        font-size: 1.6rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-detail-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .course-detail-header h2 {
        font-size: 2rem;
    }

    .lesson-item {
        padding: 1rem;
    }

    .lesson-navigation {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .auth-box {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .welcome-text {
        display: none;
    }

    .lesson-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lesson-info h4 {
        font-size: 1rem;
    }
}
