/* STARFlow Video Gallery Styles */

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --background-color: #000000;
    --surface-color: #1C1C1E;
    --card-color: #2C2C2E;
    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF5;
    --text-tertiary: #EBEBF599;
    --border-color: #38383A;
    --accent-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.header-content {
    text-align: center;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.badge.arxiv {
    background-color: #b31b1b;
    color: white;
}

.badge.github {
    background-color: #24292e;
    color: white;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Main Content */
.main {
    padding: 3rem 0;
}

/* Navigation Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    padding-bottom: 1rem;
}

.tab-button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--text-secondary);
    background-color: var(--card-color);
}

.tab-button.active {
    color: var(--text-primary);
    background: var(--accent-gradient);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tab-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-item {
    background: var(--card-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: var(--surface-color);
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.video-details {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Comparison Grid */
.comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.comparison-item {
    background: var(--card-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.comparison-item h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-align: center;
}

.comparison-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.comparison-video {
    text-align: center;
}

.comparison-video h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.comparison-video video {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    object-fit: cover;
}

/* Technical Details */
.technical-details {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.detail-card {
    background: var(--card-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.detail-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.detail-card ul {
    list-style: none;
}

.detail-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.detail-card li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Footer */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer p {
    color: var(--text-tertiary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.video-container video:not([src]) + *::before {
    display: block;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .tabs {
        gap: 0.25rem;
    }

    .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .comparison-videos {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .video-item {
        margin-bottom: 1.5rem;
    }
}
