/* Theme Transitions */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.video-title, 
.video-creator, 
.section-title,
.bookmarks,
.bookmark-item,
.comment-display,
.timestamp-link {
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Video page styles */
.video-container {
    margin-bottom: 30px;
}

.video-info {
    margin-bottom: 20px;
}

.video-title {
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.dark-theme .video-title {
    color: #e8eaed;
}

.video-creator {
    font-size: 1.1rem;
    color: #666;
}

.dark-theme .video-creator {
    color: #9aa0a6;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #000;
    margin-bottom: 30px;
}

.video-wrapper iframe, 
.video-wrapper #player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Bookmarks Section */
.bookmarks-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.dark-theme .section-title {
    color: #e8eaed;
}

.bookmarks {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.dark-theme .bookmarks {
    background-color: #303134;
}

.bookmark-item {
    background-color: #fff;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

.dark-theme .bookmark-item {
    background-color: #2c2c2c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.bookmark-item:hover {
    background-color: #f5f5f5;
}

.dark-theme .bookmark-item:hover {
    background-color: #3c4043;
}

.timestamp-link {
    display: inline-flex;
    align-items: center;
    color: #1976D2;
    text-decoration: none;
    font-size: 1rem;
    gap: 8px;
    white-space: nowrap;
    min-width: 70px;
}

.timestamp-link:hover {
    text-decoration: none;
    font-weight: bold;
}

.dark-theme .timestamp-link {
    color: #8ab4f8;
}

.comment-display {
    flex: 1;
    font-style: italic;
    color: #555;
    padding: 5px 8px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 100px);
}

.dark-theme .comment-display {
    background-color: rgba(255, 255, 255, 0.05);
    color: #bbb;
}

.no-bookmarks, 
.loading,
.error {
    text-align: center;
    padding: 30px;
    background-color: #f2f2f2;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

.dark-theme .no-bookmarks,
.dark-theme .loading,
.dark-theme .error {
    background-color: #303134;
    color: #9aa0a6;
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Utility Classes */
.d-none {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-title {
        font-size: 1.4rem;
    }
    
    .video-creator {
        font-size: 1rem;
    }
    
    .bookmark-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .timestamp-link {
        width: auto;
    }
    
    .comment-display {
        width: 100%;
        max-width: 100%;
        white-space: normal;
    }
}

/* Video Header */
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.video-header h3 {
    margin: 0;
    flex: 1;
}

.video-actions {
    display: flex;
    gap: 10px;
}

.video-actions .pure-button {
    font-size: 0.9em;
    padding: 6px 12px;
    background-color: #1b98f8;
    color: white;
}

.video-actions .pure-button:hover {
    background-color: #1884d8;
}

.video-actions .pure-button i {
    margin-right: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1000;
    backdrop-filter: blur(0);
    transition: background-color 0.3s, backdrop-filter 0.3s;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal[style*="display: block"] {
    display: flex !important;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    width: 70%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.modal[style*="display: block"] .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.6;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #666;
    padding: 5px;
    transition: color 0.2s;
}

.close-button:hover {
    color: #333;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Dark Theme Support */
.dark-theme .modal-content {
    background-color: #2d2d2d;
    border: 1px solid #404040;
}

.dark-theme .modal-header {
    border-bottom-color: #404040;
}

.dark-theme .modal-header h3 {
    color: #fff;
}

.dark-theme .modal-body {
    color: #e0e0e0;
}

.dark-theme .close-button {
    color: #999;
}

.dark-theme .close-button:hover {
    color: #fff;
}

.dark-theme .loading-spinner {
    color: #999;
}

/* Summary Content Styles */
.summary-content {
    padding: 10px 0;
}

.summary-content h4 {
    margin: 20px 0 15px;
    color: #333;
    font-size: 1.1em;
}

.summary-content p {
    margin: 0 0 15px;
    line-height: 1.6;
    color: #444;
}

.transcript-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.transcript-note {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.transcript-preview {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #fff3f3;
    border-radius: 4px;
    color: #d32f2f;
}

.error-message i {
    font-size: 1.2em;
}

/* Dark theme support */
.dark-theme .summary-content h4 {
    color: #e0e0e0;
}

.dark-theme .summary-content p {
    color: #ccc;
}

.dark-theme .transcript-section {
    border-top-color: #404040;
}

.dark-theme .transcript-note {
    color: #999;
}

.dark-theme .transcript-preview {
    background: #2a2a2a;
    color: #bbb;
}

.dark-theme .error-message {
    background-color: #3a2828;
    color: #ff8a8a;
}

/* Quiz Styles */
.quiz-content {
    padding: 10px 0;
}

.quiz-instructions {
    margin-bottom: 25px;
    color: #666;
    font-style: italic;
}

.quiz-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.quiz-question h4 {
    margin: 0 0 15px;
    color: #333;
    font-size: 1.1em;
}

.quiz-question p {
    margin: 0 0 20px;
    line-height: 1.5;
    color: #444;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.quiz-option:hover {
    background-color: #f0f0f0;
}

.quiz-option input[type="radio"] {
    margin-top: 3px;
}

.quiz-option label {
    flex: 1;
    cursor: pointer;
    color: #333;
}

.question-feedback {
    margin-top: 15px;
}

.feedback-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    font-weight: 500;
}

.feedback-message.correct {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.feedback-message.incorrect {
    background-color: #fbe9e7;
    color: #c62828;
}

.feedback-message i {
    font-size: 1.2em;
}

/* Dark theme support */
.dark-theme .quiz-question {
    background: #2a2a2a;
}

.dark-theme .quiz-question h4 {
    color: #e0e0e0;
}

.dark-theme .quiz-question p,
.dark-theme .quiz-option label {
    color: #ccc;
}

.dark-theme .quiz-instructions {
    color: #999;
}

.dark-theme .quiz-option:hover {
    background-color: #333;
}

.dark-theme .feedback-message.correct {
    background-color: #1b3723;
    color: #81c784;
}

.dark-theme .feedback-message.incorrect {
    background-color: #3e2723;
    color: #ef9a9a;
}

.quiz-question h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quiz-option:hover {
    background-color: #e9ecef;
}

.quiz-option.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.quiz-option.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
