:root {
    --bg: #050509;
    --bg-panel: #101018;
    --bg-card: #151522;
    --border: #26263a;
    --text-main: #e5e5f5;
    --text-muted: #9a9ab8;
    --accent-orange: #ffb347;
    --accent-blue: #4da6ff;
    --accent-orange-soft: rgba(255, 179, 71, 0.25);
    --accent-blue-soft: rgba(77, 166, 255, 0.25);
    --radius: 14px;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
    --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: radial-gradient(circle at top, #151530 0, #050509 55%);
    color: var(--text-main);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

.header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(10,10,20,0.4);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.logo-icon {
    width: 36px;
    height: 36px;
    filter: invert(1) drop-shadow(0 0 12px rgba(255,179,71,0.5));
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* HERO */

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero-title {
    font-size: 2rem;
    margin: 0 0 8px;
}

.hero-subtitle {
    margin: 0;
    color: var(--text-muted);
}

/* UPLOAD SECTION */

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.upload-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.dropzone {
    border: 1px dashed rgba(255,255,255,0.18);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: rgba(5,5,12,0.9);
    position: relative;
    transition: 0.2s ease;
}

.dropzone:hover {
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 0 24px rgba(255,179,71,0.35);
}

.dropzone.dragover {
    background: linear-gradient(120deg, var(--accent-orange-soft), var(--accent-blue-soft));
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.dropzone-title {
    margin: 0 0 4px;
    font-weight: 500;
}

.dropzone-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.format-row {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.format-row select {
    background: #0b0b14;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 999px;
}

.btn-primary {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(120deg, var(--accent-orange), var(--accent-blue));
    color: #050509;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(255,179,71,0.4);
    transition: 0.1s ease;
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.status-area {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-blue));
    box-shadow: 0 0 12px rgba(255,179,71,0.7);
    transition: width 0.2s ease;
}

.result-area {
    margin-top: 16px;
    border-top: 1px dashed rgba(255,255,255,0.12);
    padding-top: 12px;
}

.btn-secondary,
.btn-ghost {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(10,10,20,0.9);
    color: var(--text-main);
    cursor: pointer;
    margin-right: 8px;
}

.btn-ghost {
    background: transparent;
}

/* AD CARDS */

.ad-card {
    width: 100%;
    background: rgba(8,8,18,0.95);
    border: 1px solid rgba(77,166,255,0.4);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ad-slot {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* INFO GRID */

.info-grid {
    margin-top: 40px;
    display: grid;
    gap: 16px;
}

.info-card {
    background: rgba(10,10,20,0.9);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 16px;
}

.info-card h2 {
    margin: 0 0 6px;
}

.info-card p {
    margin: 0;
    color: var(--text-muted);
}

/* FOOTER */

.footer {
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: var(--text-muted);
}

.footer-links a {
    margin-left: 12px;
    color: var(--text-muted);
    text-decoration: none;
}

.hidden { display: none; }
