:root {
    --twitch: #9146ff;
    --gold: #c8a84b;
    --gold-glow: rgba(200,168,75,0.5);
    --glass: rgba(8,8,18,0.72);
    --border: rgba(255,255,255,0.07);
    --ai: #00c896;
    --red: #e05252;
    --text: #e8e8f0;
    --text-muted: rgba(255,255,255,0.35);
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 13px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font-body); background: #060608; color: #fff; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }

.bg { position: fixed; inset: 0; z-index: 0; background: #060608; }
.bg::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(145,70,255,0.18) 0%, rgba(200,168,75,0.1) 50%, rgba(0,200,150,0.12) 100%); background-size: 300% 300%; animation: bgShift 14s ease infinite; }
@keyframes bgShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.bg::after { content: ''; position: absolute; inset: 0; background: rgba(4,4,14,0.52); }

.noise { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 180px; }

.orb { position: fixed; border-radius: 50%; filter: blur(90px); opacity: 0.14; z-index: 0; pointer-events: none; animation: orbFloat linear infinite; }
.orb-1 { width: 700px; height: 700px; background: #9146ff; top: -260px; left: -220px; animation-duration: 22s; }
.orb-2 { width: 460px; height: 460px; background: #c8a84b; bottom: -130px; right: -130px; animation-duration: 28s; animation-delay: -9s; }
.orb-3 { width: 360px; height: 360px; background: #00c896; top: 42%; left: 52%; animation-duration: 19s; animation-delay: -5s; }
@keyframes orbFloat { 0%, 100% { transform: translate(0px, 0px) scale(1); } 25% { transform: translate(24px, -24px) scale(1.04); } 50% { transform: translate(-18px, 18px) scale(0.96); } 75% { transform: translate(18px, 26px) scale(1.02); } }

/* PAGE LAYOUT */
.page { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 60px 20px 100px; width: 100%; max-width: 660px; margin: 0 auto; }

/* APP WRAP for studio/gallery pages */
.app-wrap { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; max-width: 1400px; margin: 0 auto; padding: 0 24px 60px; }

/* HERO */
.hero { text-align: center; margin-bottom: 44px; }
.hero-eyebrow { font-size: 0.72rem; letter-spacing: 7px; text-transform: uppercase; color: var(--gold); opacity: 0.75; margin-bottom: 14px; }
.hero-name { font-family: var(--font-head); font-size: clamp(3.8rem, 11vw, 6rem); font-weight: 700; letter-spacing: -1px; line-height: 1; text-transform: uppercase; }
.hero-name .first { display: block; color: #fff; text-shadow: 0 0 50px rgba(255,255,255,0.2); }
.hero-name .last { display: block; background: linear-gradient(135deg, #e8c96a 0%, #c8a84b 40%, #a07830 70%, #e8c96a 100%); background-size: 250% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: gradientFlow 4s ease infinite; filter: drop-shadow(0 0 18px rgba(200,168,75,0.7)); }
@keyframes gradientFlow { 0% { background-position: 0% center; } 50% { background-position: 100% center; } 100% { background-position: 0% center; } }
.hero-divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px 0 4px; }
.divider-line { height: 1px; width: 56px; background: linear-gradient(to right, transparent, var(--gold)); border-radius: 2px; }
.divider-line.flip { background: linear-gradient(to left, transparent, var(--gold)); }
.hero-sub { font-size: 0.68rem; letter-spacing: 5px; text-transform: uppercase; color: rgba(255,255,255,0.3); white-space: nowrap; }

/* NAV */
.studio-nav { display: flex; align-items: center; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 28px; position: relative; z-index: 10; }
.nav-brand { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.06em; flex-shrink: 0; color: #fff; }
.nav-brand span { color: var(--gold); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.88rem; font-weight: 500; padding: 6px 14px; border-radius: 6px; display: flex; align-items: center; gap: 7px; transition: color 0.2s, background 0.2s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--gold); background: rgba(200,168,75,0.1); }
.nav-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-username { font-size: 0.82rem; color: var(--text-muted); }
.nav-logout { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
.nav-logout:hover { color: var(--red); }

/* CARDS */
.card { position: relative; background: var(--glass); backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px); border: 1px solid var(--border); border-radius: 22px; padding: 34px 28px 28px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 13px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.05) inset; }
.card-top-line { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, rgba(145,70,255,0.65), transparent); }
.card-top-line.gold { background: linear-gradient(to right, transparent, rgba(200,168,75,0.9), transparent); }
.card-glow { position: absolute; width: 360px; height: 260px; top: -80px; left: 50%; transform: translateX(-50%); pointer-events: none; border-radius: 50%; filter: blur(40px); opacity: 0.6; }
.glow-gold { background: radial-gradient(circle, rgba(200,168,75,0.2) 0%, transparent 70%); }
.glow-green { background: radial-gradient(circle, rgba(0,200,150,0.11) 0%, transparent 70%); }

/* TAGS */
.card-tag { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 0.63rem; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; padding: 5px 13px; border-radius: 20px; }
.tag-private { background: rgba(200,168,75,0.14); color: var(--gold); border: 1px solid rgba(200,168,75,0.28); }
.tag-online { background: rgba(0,200,150,0.14); color: var(--ai); border: 1px solid rgba(0,200,150,0.28); }
@keyframes blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.72); } }

/* ICONS */
.ai-icon { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; background: rgba(0,200,150,0.1); border: 2px solid rgba(0,200,150,0.3); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--ai); animation: aiPulse 3s ease-in-out infinite; }
.gold-icon { background: rgba(200,168,75,0.1); border-color: rgba(200,168,75,0.3); color: var(--gold); }
@keyframes aiPulse { 0%, 100% { box-shadow: 0 0 20px rgba(200,168,75,0.2); } 50% { box-shadow: 0 0 46px rgba(200,168,75,0.55), 0 0 80px rgba(200,168,75,0.18); } }

.card-name { position: relative; z-index: 1; font-size: 1.22rem; font-weight: 800; letter-spacing: -0.3px; }
.card-desc { position: relative; z-index: 1; font-size: 0.875rem; color: rgba(255,255,255,0.42); line-height: 1.55; max-width: 300px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 15px 20px; border-radius: var(--radius); text-decoration: none; color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; border: 1px solid transparent; cursor: pointer; position: relative; overflow: hidden; background: none; width: 100%; transition: transform 0.1s ease, filter 0.1s ease; }
.btn:active { transform: scale(0.96); filter: brightness(0.85); }
.btn.full { width: 100%; }
.btn-studio { background: var(--gold); color: #0a0a0f; font-weight: 800; box-shadow: 0 4px 22px rgba(200,168,75,0.4), inset 0 1px 0 rgba(255,255,255,0.2); border-color: rgba(200,168,75,0.35); }
.btn-studio:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: #fff; border-radius: 8px; font-family: var(--font-body); font-size: 0.85rem; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: border-color 0.2s, background 0.2s; width: auto; }
.btn-ghost:hover { border-color: var(--gold); background: rgba(200,168,75,0.08); }
.btn-icon { background: rgba(0,0,0,0.5); border: 1px solid var(--border); color: #fff; border-radius: 6px; padding: 6px 10px; cursor: pointer; text-decoration: none; font-size: 0.8rem; display: inline-flex; align-items: center; transition: background 0.2s; width: auto; }
.btn-delete:hover { background: rgba(224,82,82,0.2) !important; color: var(--red); }

/* LOGIN FORM */
.login-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
input[type="text"], input[type="password"], textarea { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; color: #fff; font-family: var(--font-body); font-size: 0.95rem; padding: 10px 14px; width: 100%; transition: border-color 0.2s; outline: none; resize: vertical; }
input:focus, textarea:focus { border-color: var(--gold); }
input[type="range"] { width: 100%; cursor: pointer; accent-color: var(--gold); }
.login-error { background: rgba(224,82,82,0.12); border: 1px solid rgba(224,82,82,0.3); color: #ff8080; border-radius: 8px; padding: 10px 14px; font-size: 0.85rem; }

/* PANELS */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--glass); backdrop-filter: blur(32px); border: 1px solid var(--border); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.panel-label { font-family: var(--font-head); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 4px; }

/* DROP ZONE */
.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: pointer; color: var(--text-muted); font-size: 0.88rem; transition: border-color 0.2s, background 0.2s; text-align: center; }
.drop-zone i { font-size: 2rem; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--gold); background: rgba(200,168,75,0.04); }

.result-img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.result-video { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { font-size: 0.78rem; color: var(--text-muted); }
.hint-inline { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }

/* STATUS OVERLAY */
.status-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(6,6,8,0.88); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; }
.status-card { background: var(--glass); border: 1px solid rgba(200,168,75,0.2); border-radius: 22px; padding: 48px 56px; display: flex; flex-direction: column; align-items: center; gap: 20px; box-shadow: 0 32px 80px rgba(0,0,0,0.7); }
.spinner { width: 44px; height: 44px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em; }
.status-sub { color: var(--text-muted); font-size: 0.85rem; }

/* GALLERY */
.gallery-upload-bar { display: flex; align-items: center; gap: 14px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 28px; }
.gallery-upload-label { font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.gallery-section { margin-bottom: 40px; }
.gallery-section-header { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; color: var(--gold); display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.gallery-count { background: rgba(200,168,75,0.15); color: var(--gold); font-size: 0.72rem; padding: 2px 8px; border-radius: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery-grid-video { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--glass); aspect-ratio: 16/9; }
.gallery-img, .gallery-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item-actions { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); padding: 20px 10px 10px; display: flex; gap: 6px; justify-content: flex-end; opacity: 0; transition: opacity 0.2s; }
.gallery-item:hover .gallery-item-actions { opacity: 1; }
.gallery-empty { color: var(--text-muted); font-size: 0.9rem; padding: 20px 0; }
.btn-col { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; width: 100%; }

@media (max-width: 768px) { .panel-grid { grid-template-columns: 1fr; } .app-wrap { padding: 0 14px 40px; } }
