/* ═══════════════════════════════════════════════════════════════
   GoKeşfet — Creator Studio Ultra CSS v6
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --purple:   #a78bfa;
    --cyan:     #06b6d4;
    --pink:     #f472b6;
    --green:    #34d399;
    --orange:   #fb923c;
    --bg:       #000;
    --surface:  rgba(255,255,255,0.06);
    --surface2: rgba(255,255,255,0.10);
    --border:   rgba(255,255,255,0.12);
    --text:     #fff;
    --text2:    rgba(255,255,255,0.55);
    --radius:   16px;
    --radius-lg:24px;
    --grad: linear-gradient(135deg, var(--purple), var(--cyan));
}

html, body {
    width: 100%; height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── SCREEN SYSTEM ─── */
.screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
    transform: translateY(12px);
    z-index: 1;
}
.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    z-index: 10;
}
.screen.slide-out {
    opacity: 0;
    transform: translateY(-12px);
}

/* ─── GLASS BUTTON ─── */
.glass-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.glass-btn:hover { background: rgba(255,255,255,0.22); }

.glass-btn-dark {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.glass-btn-dark:hover { background: rgba(0,0,0,0.55); }

/* ─── BTN CLOSE FLOATING ─── */
.btn-close-floating {
    position: absolute;
    top: 52px; left: 20px;
    z-index: 20;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.btn-close-floating:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }

/* ════════════════════════════════════
   SCREEN 1 — MODE SELECT
════════════════════════════════════ */
.screen-select-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(167,139,250,0.25) 0%, transparent 60%),
                radial-gradient(ellipse at 75% 65%, rgba(6,182,212,0.18) 0%, transparent 55%),
                #000;
    z-index: 0;
}
.screen-select-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 1;
}

.screen-select-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%; max-width: 480px;
    padding: 0 24px;
}

.logo-wrap { text-align: center; }
.logo-eagle { font-size: 56px; line-height: 1; margin-bottom: 12px; }
.logo-text {
    font-size: 28px; font-weight: 900;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.logo-sub { color: var(--text2); font-size: 13px; margin-top: 4px; }

.mode-cards {
    display: flex; gap: 16px;
    width: 100%;
}
.mode-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 32px 16px;
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    cursor: pointer;
    transition: background .25s, transform .25s, border-color .25s;
    color: #fff;
}
.mode-card:hover, .mode-card:active {
    background: var(--surface2);
    border-color: var(--purple);
    transform: translateY(-4px) scale(1.02);
}
.mode-card-icon { font-size: 36px; }
.mode-card-label { font-size: 16px; font-weight: 700; }
.mode-card-desc { font-size: 12px; color: var(--text2); }

/* ════════════════════════════════════
   SCREEN 2 — CAMERA
════════════════════════════════════ */
#screen-camera { background: #000; }

#cam-preview {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.cam-gradient-top {
    position: absolute; top: 0; left: 0; right: 0; height: 160px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 2; pointer-events: none;
}
.cam-gradient-bottom {
    position: absolute; bottom: 0; left: 0; right: 0; height: 260px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 2; pointer-events: none;
}

/* Top bar */
.cam-topbar {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 52px 20px 16px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 5;
}
.duration-pills {
    display: flex; gap: 6px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
}
.dur-pill {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 13px; font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .2s;
}
.dur-pill.active {
    background: var(--grad);
    color: #fff;
}

/* Record ring */
.rec-ring-wrap {
    position: absolute;
    bottom: 110px;
    left: 50%; transform: translateX(-50%);
    width: 100px; height: 100px;
    z-index: 5;
    cursor: pointer;
}
.rec-ring-svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg);
}
.rec-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.18);
    stroke-width: 5;
}
.rec-ring-fill {
    fill: none;
    stroke: url(#ringGrad);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 301.6;
    stroke-dashoffset: 301.6;
    transition: stroke-dashoffset .1s linear;
}
/* SVG gradient injected via JS */

.rec-center-btn {
    position: absolute; inset: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s;
}
.rec-center-btn:active { transform: scale(0.93); }
.rec-center-btn.recording { background: #fff; }

.rec-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #ef4444;
    transition: border-radius .2s, width .2s, height .2s;
}
.rec-dot.recording {
    border-radius: 6px;
    width: 26px; height: 26px;
}

/* Recording status */
.rec-status {
    position: absolute;
    top: 130px; left: 50%; transform: translateX(-50%);
    background: rgba(239,68,68,0.85);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 5px 16px;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    z-index: 5;
    white-space: nowrap;
}
.rec-blink {
    color: #fff;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }

/* Filters */
.filters-row {
    position: absolute; bottom: 30px; left: 0; right: 0;
    display: flex; gap: 8px; padding: 0 16px;
    overflow-x: auto; z-index: 5;
    scrollbar-width: none;
}
.filters-row::-webkit-scrollbar { display: none; }
.filter-chip {
    flex-shrink: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px; font-weight: 600;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.filter-chip.active {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}

.hidden { display: none !important; }

/* ════════════════════════════════════
   SCREEN 3 — UPLOAD DROP
════════════════════════════════════ */
.upload-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(6,182,212,0.15) 0%, transparent 65%), #0a0a0f;
}

.upload-zone {
    position: relative; z-index: 1;
    width: min(420px, 90vw);
    display: flex; flex-direction: column;
    align-items: center; gap: 14px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 2px dashed rgba(167,139,250,0.35);
    border-radius: var(--radius-lg);
    padding: 52px 32px;
    text-align: center;
    transition: border-color .25s, background .25s;
    cursor: default;
}
.upload-zone.dragover {
    border-color: var(--purple);
    background: rgba(167,139,250,0.1);
}

.upload-zone-icon { margin-bottom: 4px; }
.upload-title { font-size: 20px; font-weight: 800; }
.upload-sub { color: var(--text2); font-size: 14px; }
.upload-hint { color: rgba(255,255,255,0.3); font-size: 12px; }

.btn-browse {
    margin-top: 8px;
    padding: 12px 28px;
    background: var(--grad);
    border: none; border-radius: 999px;
    color: #fff; font-size: 15px; font-weight: 700;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}
.btn-browse:hover { opacity: 0.88; transform: scale(1.03); }

/* ════════════════════════════════════
   SCREEN 4 — PUBLISH
════════════════════════════════════ */
.publish-bg-blur {
    position: absolute; inset: 0;
    background: #060612;
}

.publish-wrap {
    position: relative; z-index: 1;
    width: 100%; max-width: 860px;
    height: 100%;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.pub-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 52px 20px 16px;
    flex-shrink: 0;
}
.pub-title { font-size: 17px; font-weight: 700; }

.pub-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 24px;
    padding: 16px 20px 32px;
}

/* Left: video preview */
.pub-preview-col {
    flex-shrink: 0;
    width: 160px;
}
.pub-video-frame {
    position: relative;
    width: 160px; height: 284px;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    border: 1px solid var(--border);
}
.pub-video-frame video {
    width: 100%; height: 100%;
    object-fit: cover;
}
.pub-video-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.25);
}
.pub-play-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #000;
    font-size: 16px;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s;
}
.pub-play-btn:hover { transform: scale(1.1); }

/* Right: form */
.pub-form-col {
    flex: 1;
    overflow-y: auto;
    display: flex; flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
    padding-right: 4px;
}

.pub-field { display: flex; flex-direction: column; gap: 8px; }

.pub-label {
    font-size: 13px; font-weight: 600;
    color: var(--text2);
    text-transform: uppercase; letter-spacing: 0.4px;
}

.pub-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 14px; line-height: 1.5;
    padding: 12px 14px;
    resize: none;
    min-height: 90px;
    transition: border-color .2s;
    outline: none;
}
.pub-textarea:focus { border-color: var(--purple); }

.pub-char-row {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.pub-charcount { font-size: 12px; color: rgba(255,255,255,0.3); flex-shrink: 0; padding-top: 2px; }

.pub-hashtag-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.hchip {
    background: rgba(167,139,250,0.15);
    border: 1px solid rgba(167,139,250,0.3);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px; font-weight: 600;
    color: var(--purple);
    cursor: pointer;
    transition: background .15s, border-color .15s;
    user-select: none;
}
.hchip:hover { background: rgba(167,139,250,0.25); }
.hchip.used {
    background: rgba(167,139,250,0.3);
    border-color: var(--purple);
}

.pub-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 11px 14px;
    outline: none;
    transition: border-color .2s;
}
.pub-input:focus { border-color: var(--cyan); }

/* Privacy toggle */
.pub-privacy-row { flex-direction: row; align-items: center; justify-content: space-between; }
.privacy-toggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
}
.priv-opt {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    transition: all .2s;
}
.priv-opt.active {
    background: var(--grad);
    color: #fff;
}

/* Publish button */
.btn-publish-main {
    width: 100%;
    padding: 16px;
    background: var(--grad);
    border: none; border-radius: var(--radius);
    color: #fff; font-size: 16px; font-weight: 800;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    margin-top: 8px;
    position: relative; overflow: hidden;
}
.btn-publish-main::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0);
    transition: background .15s;
}
.btn-publish-main:hover { opacity: 0.9; transform: scale(1.01); }
.btn-publish-main:active { transform: scale(0.98); }
.btn-publish-main:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── UPLOAD OVERLAY ─── */
.upload-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
}
.upload-overlay-card {
    display: flex; flex-direction: column;
    align-items: center; gap: 16px;
    width: min(320px, 90vw);
    padding: 40px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}
.upl-lottie-wrap { font-size: 64px; line-height: 1; animation: rocket-fly 1.2s ease-in-out infinite alternate; }
@keyframes rocket-fly {
    from { transform: translateY(0) rotate(-5deg); }
    to   { transform: translateY(-12px) rotate(5deg); }
}
.upl-title { font-size: 20px; font-weight: 800; }
.upl-sub { font-size: 13px; color: var(--text2); }
.upl-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
}
.upl-bar-fill {
    height: 100%;
    background: var(--grad);
    border-radius: 999px;
    width: 0%;
    transition: width .25s ease;
}
.upl-pct { font-size: 28px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ─── SUCCESS OVERLAY ─── */
.success-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,0.95);
    display: flex; align-items: center; justify-content: center;
}
.success-card {
    display: flex; flex-direction: column;
    align-items: center; gap: 16px;
    width: min(340px, 90vw);
    padding: 48px 32px;
    background: linear-gradient(135deg, rgba(167,139,250,0.1), rgba(6,182,212,0.08));
    border: 1px solid rgba(167,139,250,0.3);
    border-radius: 28px;
    text-align: center;
    animation: pop-in .45s cubic-bezier(0.17, 0.89, 0.32, 1.28) both;
}
@keyframes pop-in {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.success-emoji { font-size: 72px; line-height: 1; }
.success-title { font-size: 28px; font-weight: 900; }
.success-sub { font-size: 14px; color: var(--text2); line-height: 1.6; }

.btn-go-profile {
    width: 100%;
    padding: 14px;
    background: var(--grad);
    border: none; border-radius: var(--radius);
    color: #fff; font-size: 15px; font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity .2s;
}
.btn-go-profile:hover { opacity: 0.88; }

.btn-new-video {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text2); font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.btn-new-video:hover { border-color: var(--purple); color: #fff; }

/* ─── MOBILE ADJUSTMENTS ─── */
@media (max-width: 600px) {
    .pub-content { flex-direction: column; padding-bottom: 20px; }
    .pub-preview-col { width: 100%; }
    .pub-video-frame { width: 100%; height: auto; aspect-ratio: 9/16; max-height: 45vh; }
    .pub-form-col { overflow-y: visible; }
    .publish-wrap { overflow-y: auto; }
    .pub-content { overflow: visible; }

    .mode-cards { flex-direction: column; max-width: 300px; }
    .mode-card { flex-direction: row; padding: 20px 24px; gap: 16px; text-align: left; }
    .mode-card-icon { font-size: 28px; }
}

@media (min-height: 700px) {
    .rec-ring-wrap { bottom: 130px; }
    .filters-row { bottom: 50px; }
}
