/* Lincoln CMS - Professional Video Management System */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0f4c75 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

/* Container Layout */
.cms-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.cms-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Connection Status Indicators */
.connection-status {
    display: flex;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.status-indicator.connected .status-dot {
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.status-indicator.disconnected .status-dot {
    background: #ff4757;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

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

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ccc;
}

.status-indicator.connected .status-text {
    color: #00ff88;
}

.status-indicator.disconnected .status-text {
    color: #ff4757;
}

/* Main Content */
.cms-main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Tab Navigation */
.cms-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab-button.active {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Panel Content */
.panel {
    display: none;
}

.panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Captions Header */
.captions-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.captions-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.captions-header p {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
}

/* System Status Dashboard */
.system-status-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.status-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.queue-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    color: #ccc;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: #00d4ff;
    font-size: 1.1rem;
}

/* Progress Bars */
.overall-progress {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-weight: 700;
    color: #00d4ff;
    font-size: 1.1rem;
}

.language-coverage {
    text-align: center;
}

.coverage-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00d4ff;
}

/* Action Controls */
.action-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-success {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #ffa726, #ff9800);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 167, 38, 0.4);
}

.btn-info {
    background: linear-gradient(45deg, #42a5f5, #1976d2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.4);
}

.btn-primary {
    background: linear-gradient(45deg, #e91e63, #c2185b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Series Container */
.series-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.series-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.series-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.series-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

.series-actions {
    display: flex;
    gap: 0.75rem;
}

.series-videos {
    padding: 1.5rem;
}

/* Video Row */
.video-row {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 1.5fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.video-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.video-row:last-child {
    margin-bottom: 0;
}

/* Video Info */
.video-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-filename {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.video-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: #888;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.video-duration {
    font-size: 0.9rem;
    color: #ccc;
}

/* Video Status */
.video-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transcription-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.status-value.pending {
    color: #ffa726;
}

.status-value.in_progress {
    color: #42a5f5;
}

.status-value.completed {
    color: #66bb6a;
}

.status-value.failed {
    color: #ef5350;
}

/* Language Chips */
.language-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.language-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.language-chip.pending {
    background: rgba(255, 167, 38, 0.2);
    color: #ffa726;
    border-color: rgba(255, 167, 38, 0.3);
}

.language-chip.in-progress {
    background: rgba(66, 165, 245, 0.2);
    color: #42a5f5;
    border-color: rgba(66, 165, 245, 0.3);
    animation: pulse 2s infinite;
}

.language-chip.completed {
    background: rgba(102, 187, 106, 0.2);
    color: #66bb6a;
    border-color: rgba(102, 187, 106, 0.3);
}

.language-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chip-text {
    font-weight: 600;
}

.download-chip {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.download-chip:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Video Actions */
.video-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.message-success {
    background: rgba(102, 187, 106, 0.9);
    color: #fff;
    border-left: 4px solid #66bb6a;
}

.message-error {
    background: rgba(239, 83, 80, 0.9);
    color: #fff;
    border-left: 4px solid #ef5350;
}

.message-warning {
    background: rgba(255, 167, 38, 0.9);
    color: #fff;
    border-left: 4px solid #ffa726;
}

.message-info {
    background: rgba(66, 165, 245, 0.9);
    color: #fff;
    border-left: 4px solid #42a5f5;
}

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

/* Media Controls */
.media-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .video-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .video-info, .video-status, .language-chips, .video-actions {
        justify-self: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .cms-main {
        padding: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .connection-status {
        justify-content: center;
    }
    
    .system-status-dashboard {
        grid-template-columns: 1fr;
    }
    
    .control-group {
        flex-direction: column;
        align-items: center;
    }
    
    .series-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .series-actions {
        justify-content: center;
    }
    
    .message-container {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .captions-header h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .language-chips {
        justify-content: center;
    }
}

