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

:root {
    color-scheme: dark;
    --bg: #0a1221;
    --surface: rgba(18, 30, 56, 0.85);
    --surface-strong: rgba(12, 20, 46, 0.95);
    --border: rgba(255, 255, 255, 0.16);
    --accent: #7c5cff;
    --accent-soft: rgba(124, 92, 255, 0.14);
    --text: #f8f9ff;
    --muted: #9aa4c4;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background: radial-gradient(circle at top left, rgba(124, 92, 255, 0.24), transparent 24%),
                radial-gradient(circle at bottom right, rgba(9, 204, 255, 0.16), transparent 22%),
                linear-gradient(135deg, #08101f 0%, #101b33 48%, #0a1221 100%);
    color: var(--text);
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.page-shell {
    width: min(1120px, 100%);
    min-height: min(920px, calc(100vh - 4rem));
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    background: linear-gradient(180deg, rgba(10, 18, 33, 0.96), rgba(8, 13, 24, 0.92));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.page-shell::before,
.page-shell::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(64px);
}

.page-shell::before {
    width: 420px;
    height: 420px;
    background: rgba(124, 92, 255, 0.18);
    top: -120px;
    right: -160px;
}

.page-shell::after {
    width: 520px;
    height: 520px;
    background: rgba(9, 204, 255, 0.1);
    bottom: -180px;
    left: -120px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(2.3rem, 2.5vw, 3rem);
    letter-spacing: -0.03em;
}

.page-header p {
    margin: 0;
    color: var(--muted);
    max-width: 520px;
    line-height: 1.6;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
    height: 100%;
    position: relative;
    z-index: 1;
}

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 100%;
    padding: 3rem;
    border: 2px dashed rgba(255,255,255,0.18);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.28s ease, border-color 0.25s ease, background 0.25s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.dragover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(124, 92, 255, 0.08);
}

.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 32%),
                radial-gradient(circle at 80% 90%, rgba(124,92,255,0.1), transparent 24%);
}

.drop-zone-icon {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    color: var(--accent);
}

.drop-zone-icon svg {
    width: 44px;
    height: 44px;
}

.drop-zone h2 {
    margin: 0;
    font-size: 1.7rem;
    letter-spacing: -0.02em;
}

.drop-zone p {
    margin: 0;
    max-width: 520px;
    color: var(--muted);
    line-height: 1.7;
}

.file-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-weight: 500;
    transition: transform 0.2s ease;
}

.file-meta:hover {
    transform: translateY(-2px);
}

.file-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.file-meta strong {
    color: #ffffff;
}

.main-form {
    display: grid;
    gap: 1rem;
    align-content: start;
    min-height: 100%;
}

.input-group {
    display: grid;
    gap: 0.75rem;
}

label {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.field {
    width: 100%;
    padding: 1.15rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field:focus {
    border-color: rgba(124, 92, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
    transform: translateY(-1px);
}

.field::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.submit-card {
    margin-top: auto;
    padding: 1.5rem;
    border-radius: 28px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: grid;
    gap: 1rem;
    align-content: stretch;
}

.submit-card small {
    color: var(--muted);
    line-height: 1.6;
}

.button-primary {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #7c5cff 0%, #1f8dff 100%);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 18px 40px rgba(124, 92, 255, 0.2);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 50px rgba(124, 92, 255, 0.26);
}

.results-panel {
    padding: 2rem;
    border-radius: 32px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    min-height: 100%;
    display: grid;
    gap: 1.5rem;
    overflow: hidden;
}

.results-panel h2 {
    margin: 0;
    font-size: 1.7rem;
}

.results-panel ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.results-panel li {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 0.75rem;
}

.results-panel .result-role {
    color: var(--muted);
    font-size: 0.95rem;
}

.results-panel li::before {
    content: '🎬';
    margin-right: 0.75rem;
}

.results-panel .alert {
    padding: 1rem 1.2rem;
    border-radius: 18px;
    background: rgba(255, 103, 103, 0.16);
    border: 1px solid rgba(255, 103, 103, 0.3);
    color: #ffe6e6;
    margin-bottom: 1rem;
}

.results-panel .empty-state {
    padding: 1.5rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255,255,255,0.12);
    text-align: center;
    color: var(--muted);
}

input[type='file'] {
    display: none;
}

@media (max-width: 980px) {
    .layout-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .page-shell {
        min-height: auto;
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .drop-zone {
        padding: 2rem;
    }

    .submit-card {
        padding: 1.25rem;
    }
}
