/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
    color: var(--soft-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--soft-white);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--warm-gold);
    transform: translateY(-3px);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

/* Toast notifications */
.toast {
    padding: 15px 25px;
    border-radius: 12px;
    color: var(--soft-white);
    font-weight: 500;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.toast.error {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 0.5);
}

.toast.success {
    background: rgba(16, 185, 129, 0.9);
    border-color: rgba(16, 185, 129, 0.5);
}

.toast.info {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}

.toast.warning {
    background: rgba(245, 158, 11, 0.9);
    color: var(--soft-white);
    border-color: rgba(245, 158, 11, 0.5);
}

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

.modal-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--soft-white);
    font-size: 22px;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--soft-white);
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    margin-bottom: 25px;
}

.modal-body textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 15px;
    color: var(--soft-white);
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    min-height: 120px;
    outline: none;
}

.modal-body textarea:focus {
    border-color: var(--bantu-blue);
}

.modal-body p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 15px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-btn {
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--soft-white);
}

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

.save-btn {
    background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
    color: var(--soft-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.delete-btn {
    background: linear-gradient(135deg, var(--error-color), #c92a2a);
    color: var(--soft-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Control buttons */
.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--soft-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.control-btn.active {
    background: var(--bantu-blue);
    color: white;
}

/* Section styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--soft-white), var(--warm-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Video Player Error Overlay - WEEK 2 ADDITION */
.video-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.error-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--card-border);
}

.error-content i {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 15px;
}

.error-content h3 {
    margin-bottom: 10px;
    color: var(--soft-white);
}

.error-message {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.error-content button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin: 0 5px;
}

.error-content .retry-btn {
    background: var(--bantu-blue);
    color: white;
}

.error-content .cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--soft-white);
    border: 1px solid var(--card-border);
}

/* Buffering Indicator - WEEK 2 ADDITION */
.buffering-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.buffering-indicator .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--bantu-blue);
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

.buffering-indicator p {
    color: var(--soft-white);
    font-weight: 500;
}

/* Custom Video Controls - WEEK 2 ADDITION */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.controls-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--soft-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.time-display {
    color: var(--soft-white);
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    min-width: 100px;
}

.progress-bar {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bantu-blue);
    cursor: pointer;
}

.volume-bar {
    width: 80px;
    height: 5px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--warm-gold);
    cursor: pointer;
}

/* Settings Menu - WEEK 2 ADDITION */
.settings-menu {
    position: absolute;
    bottom: 70px;
    right: 15px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    min-width: 200px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.settings-menu h4 {
    color: var(--soft-white);
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.playback-speed, .quality-selector {
    margin-bottom: 20px;
}

.speed-option, .quality-option {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--soft-white);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speed-option:hover, .quality-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.speed-option.active, .quality-option.active {
    background: var(--bantu-blue);
    border-color: var(--bantu-blue);
}

/* Quality Suggestion - WEEK 2 ADDITION */
.quality-suggestion {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 15px;
    max-width: 300px;
    backdrop-filter: blur(10px);
    z-index: 20;
    animation: slideInRight 0.3s ease;
}

.quality-suggestion p {
    color: var(--soft-white);
    margin-bottom: 10px;
    font-size: 14px;
}

.quality-suggestion button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
}

.quality-suggestion .accept-btn {
    background: var(--bantu-blue);
    color: white;
}

.quality-suggestion .dismiss-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--soft-white);
    border: 1px solid var(--card-border);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Keyboard Shortcut Feedback - WEEK 2 ADDITION */
.shortcut-feedback {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    color: var(--soft-white);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    font-weight: 500;
    z-index: 1000;
    animation: fadeInOut 2s ease;
    backdrop-filter: blur(10px);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Keyboard Help Dialog - WEEK 2 ADDITION */
.keyboard-help-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.shortcut-item kbd {
    background: var(--deep-navy);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    border: 1px solid var(--card-border);
    min-width: 80px;
    text-align: center;
}

.help-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.help-footer i {
    margin-right: 8px;
    color: var(--bantu-blue);
}

.close-help-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--soft-white);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Offline Styles - WEEK 2 ADDITION */
body.offline .online-only {
    display: none !important;
}

.offline-toast, .online-toast, .update-toast, .update-ready-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 400px;
}

.toast-btn {
    margin-left: 10px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.toast-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Skip to Content Link - WEEK 2 ADDITION */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bantu-blue);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}

/* Virtual Scroll Styles - WEEK 2 ADDITION */
.virtual-scroll-container {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.virtual-scroll-item {
    position: absolute;
    left: 0;
    right: 0;
    will-change: transform;
}

.comment-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bantu-blue), var(--warm-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-user {
    flex: 1;
}

.comment-user strong {
    font-size: 14px;
    color: var(--soft-white);
    display: block;
    margin-bottom: 2px;
}

.comment-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.comment-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
}

.comment-actions {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.comment-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--soft-white);
}

.comment-action-btn.like-btn.liked {
    color: var(--error-color);
}

.comment-added-feedback {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bantu-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    z-index: 1000;
    animation: fadeInOut 2s ease;
}

.virtual-scroll-loading,
.virtual-scroll-empty {
    text-align: center;
    padding: 30px 20px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--bantu-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.virtual-scroll-empty i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.virtual-scroll-empty h3 {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.virtual-scroll-empty p {
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
    
    .settings-menu {
        min-width: 180px;
        padding: 15px;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    .video-controls {
        padding: 10px;
    }
    
    .controls-bar {
        gap: 10px;
    }
    
    .video-control-btn {
        width: 36px;
        height: 36px;
    }
    
    .time-display {
        min-width: 80px;
        font-size: 12px;
    }
    
    .comment-item {
        padding: 12px;
    }
    
    .comment-avatar-sm {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .comment-user strong {
        font-size: 13px;
    }
    
    .comment-content {
        font-size: 13px;
    }
    
    .comment-action-btn {
        font-size: 11px;
        padding: 3px 6px;
    }
}
