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

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: 90vh;
}

/* Login Page Styles */
.login-page {
    padding: 40px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1a2a6c;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #1a2a6c;
    outline: none;
}

.login-btn {
    background: linear-gradient(to right, #1a2a6c, #b21f1f);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-btn.loading {
    position: relative;
    color: transparent;
}

.login-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 10px;
    background: #ffebee;
    border-radius: 5px;
    display: none;
}

/* Courses Page Styles */
.courses-page {
    display: none;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.page-header h1 {
    color: #1a2a6c;
    font-size: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: #666;
    font-size: 0.9rem;
}

.logout-btn {
    background: #b21f1f;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #8a1919;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.course-card.locked {
    opacity: 0.8;
}

.course-card.locked:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.course-image {
    height: 180px;
    background: linear-gradient(45deg, #1a2a6c, #b21f1f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.course-info {
    padding: 20px;
}

.course-info h3 {
    color: #1a2a6c;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.course-info p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
}

.locked-message {
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #b21f1f;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Locked Course Modal */
.locked-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.locked-modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    animation: slideIn 0.3s;
}

.locked-modal-content h2 {
    color: #b21f1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.locked-modal-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.locked-modal-content strong {
    color: #1a2a6c;
}

.locked-modal-content button {
    background: #1a2a6c;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.locked-modal-content button:hover {
    background: #0f1a4a;
}

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

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

/* Course Content Page Styles */
.content-page {
    display: none;
    padding: 30px;
}

.back-btn {
    background: #1a2a6c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    color: #1a2a6c;
    font-size: 2rem;
    margin-bottom: 10px;
}

.content-header p {
    color: #666;
    font-size: 1.1rem;
}

.content-list {
    list-style: none;
}

.content-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.content-item:hover {
    transform: translateX(10px);
}

.content-icon {
    background: #1a2a6c;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 20px;
}

.content-details h3 {
    color: #1a2a6c;
    margin-bottom: 5px;
}

.content-details p {
    color: #888;
    font-size: 0.9rem;
}

/* Video Player Styles */
.video-page {
    display: none;
    padding: 30px;
}

.video-container {
    background: black;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.video-player {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
}

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

/* Video overlay to prevent clicks */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: default;
    background: transparent;
}

.video-controls {
    background: #333;
    padding: 10px 15px;
    border-radius: 0 0 15px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 20;
    position: relative;
}

.control-btn {
    background: transparent;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 18px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.control-btn:active {
    transform: scale(0.95);
}

/* Volume Controls */
.volume-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.2s;
}

.volume-container:hover .volume-slider-container {
    width: 80px;
}

.volume-slider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    background: #555;
    border-radius: 2px;
    outline: none;
    margin: 0 5px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Settings Menu */
.settings-container {
    position: relative;
}

.settings-menu {
    position: absolute;
    bottom: 45px;
    right: 0;
    background: rgba(40, 40, 40, 0.95);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.settings-menu.active {
    display: block;
}

.settings-item {
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.settings-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-item i {
    margin-right: 10px;
    width: 20px;
}

.settings-submenu {
    position: absolute;
    right: 100%;
    top: 0;
    background: rgba(40, 40, 40, 0.95);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 150px;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-right: 5px;
}

.settings-submenu.active {
    display: block;
}

.submenu-item {
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.submenu-item.active {
    color: #1a2a6c;
}

.submenu-item.active::after {
    content: '✓';
    margin-left: 10px;
}

.video-info {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-info h2 {
    color: #1a2a6c;
    margin-bottom: 10px;
}

.video-info p {
    color: #666;
    line-height: 1.6;
}

/* Progress bar */
.progress-container {
    flex: 1;
    padding: 0 10px;
    cursor: pointer;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    transition: height 0.1s;
}

.progress-container:hover .progress-bar {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    width: 0%;
    position: relative;
}

.progress-buffered {
    position: absolute;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    width: 0%;
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.1s;
    pointer-events: none;
}

.progress-container:hover .progress-handle {
    opacity: 1;
}

.progress-preview {
    position: absolute;
    bottom: 25px;
    background: rgba(40, 40, 40, 0.9);
    padding: 5px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    pointer-events: none;
    display: none;
    transform: translateX(-50%);
}

.time-display {
    color: white;
    font-size: 14px;
    min-width: 100px;
    text-align: center;
    user-select: none;
}

/* Loading Spinner */
.spinner {
    display: none;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner:before {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1a2a6c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .login-form {
        padding: 20px;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
    }
}