/* Global Styles */
:root {
    --primary-color: #ff0000;
    --secondary-color: #282828;
    --background-color: #f9f9f9;
    --text-color: #333;
    --border-color: #e5e5e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

/* Header */
.header {
    background-color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center;
}

/* Loading Indicator */
#loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Video List Page */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

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

/* Video Page */
.video-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 1rem;
}

.video-player-container {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#youtube-player {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 4px;
}

.video-details {
    margin-top: 1rem;
}

.video-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.video-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.video-description {
    white-space: pre-wrap;
    color: #444;
}

/* Transcript */
.transcript-container {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.transcript-entry {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.transcript-entry:hover {
    background-color: #f5f5f5;
}

.transcript-entry.active {
    background-color: #e3f2fd;
}

.timestamp {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Error Message */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 10px;
    }
} 