/* Combat-Video Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f172a;
    --bg-medium: #1e293b;
    --bg-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #475569;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.free-badge {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Upload Section */
.upload-section {
    background: var(--bg-medium);
    border-radius: 20px;
    padding: 40px;
    border: 2px dashed var(--border);
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: var(--primary);
}

.upload-zone {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.upload-item {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.upload-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-primary);
}

.upload-label svg {
    color: var(--primary);
}

.upload-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-progress {
    margin-top: 20px;
    text-align: center;
}

/* Editor Section */
.editor-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.editor-panels {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

.panel {
    background: var(--bg-medium);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid var(--border);
}

.panel h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}

/* Media Panel */
.media-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.media-list::-webkit-scrollbar {
    width: 8px;
}

.media-list::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.media-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.media-item {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.media-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.media-item.selected {
    border-color: var(--secondary);
    background: var(--bg-dark);
}

.media-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-dark);
}

.media-name {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Audio Player */
.audio-player {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5);
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.timeline {
    position: relative;
    height: 60px;
    background: var(--bg-dark);
    border-radius: 10px;
    cursor: pointer;
    overflow: visible;
}

.timeline-progress {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    pointer-events: none;
}

.timeline-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.event-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.event-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--warning);
    opacity: 0.8;
}

/* Events Section */
.events-section {
    margin-top: 20px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.events-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.event-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--warning);
}

.event-info {
    flex: 1;
}

.event-time {
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.event-media {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.event-delete {
    background: var(--error);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.event-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-style: italic;
}

/* Generate Section */
.generate-section {
    text-align: center;
    background: var(--bg-medium);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border);
}

.generate-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--secondary), #db2777);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.generate-progress {
    max-width: 500px;
    margin: 0 auto;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Buttons */
.secondary-btn {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
}

.retry-btn {
    padding: 12px 30px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-medium);
    border-radius: 20px;
}

.error-icon svg {
    color: var(--error);
    margin-bottom: 20px;
}

.error-state h2 {
    margin-bottom: 15px;
    color: var(--error);
}

#error-message {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-light);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .editor-panels {
        grid-template-columns: 1fr;
    }

    .upload-zone {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .logo {
        font-size: 2rem;
    }

    .panel {
        padding: 20px;
    }
}