@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #10b981;
    --radius: 20px;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- LANDING HERO --- */
.hero-section {
    text-align: center;
    padding: 80px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, var(--text-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    color: var(--text-dim);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 20px auto;
}

.badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

/* --- APP CONTAINER --- */
.app-wrapper {
    max-width: 1400px;
    margin: 0 auto 100px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

/* --- GLASS PANELS --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* --- SIDEBAR --- */
.sidebar {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
    position: sticky;
    top: 30px;
}

.sidebar h2 {
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar h2 i { color: var(--primary); }

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 12px;
    display: block;
}

/* --- FILE INPUTS --- */
.file-dropzone {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.file-dropzone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.file-dropzone i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.file-dropzone span {
    font-size: 0.9rem;
    font-weight: 500;
}

.file-count {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.hidden-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* --- FORM ELEMENTS --- */
.form-select, .form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-select:focus, .form-input:focus {
    border-color: var(--primary);
}

/* --- BUTTONS --- */
.btn-primary {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    border: none;
    padding: 16px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active { transform: scale(0.98); }

/* --- MAIN CONTENT --- */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.video-card {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.video-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mainVideo {
    width: 100%;
    height: 100%;
}

.video-controls {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- PROGRESS BAR --- */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    border-radius: 100px;
    box-shadow: 0 0 10px var(--primary);
}

/* --- CONTROL BUTTONS --- */
.control-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* --- SHARE BUBBLE --- */
.share-popover {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #1e1e2e;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    width: 220px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
    animation: popUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

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

.share-action {
    background: none;
    border: none;
    color: white;
    padding: 10px 14px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.share-action:hover { background: rgba(255, 255, 255, 0.05); }

/* --- LOADING --- */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

.loader-wrapper.active {
    visibility: visible;
    opacity: 1;
}

.pulse-loader {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 var(--primary-glow); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 30px transparent; }
    100% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 transparent; }
}

/* --- RESULTS DRAWER --- */
.results-card {
    padding: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    transition: 0.2s;
}

.result-item:hover { background: rgba(255, 255, 255, 0.06); }

/* --- UTILS --- */
.hidden { display: none !important; }

/* Mobile */
@media (max-width: 1024px) {
    .app-wrapper {
        grid-template-columns: 1fr;
    }
    .hero-section { padding-top: 40px; }
}