/* ============================================================
   NEW STYLE — shared base theme
   ============================================================ */

:root {
    --bg-0: #07070d;
    --ink: #f2f2f6;
    --ink-dim: rgba(242, 242, 246, 0.56);
    --ink-faint: rgba(242, 242, 246, 0.34);
    --surface: rgba(255, 255, 255, 0.055);
    --surface-border: rgba(255, 255, 255, 0.09);
    --accent: #8b5cf6;
    --accent-strong: #a78bfa;
    --mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
  
* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-0);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding: 2.5em 1.5em;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* ---------- Animated aurora wallpaper ---------- */
.wallpaper {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #120a26 0%, #07070d 60%);
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}
.blob-a {
    width: 46vw; height: 46vw;
    top: -12%; left: -8%;
    background: radial-gradient(circle, #5b2ad6 0%, transparent 70%);
    animation: drift-a 26s ease-in-out infinite;
}
.blob-b {
    width: 40vw; height: 40vw;
    top: 10%; right: -12%;
    background: radial-gradient(circle, #0e6e63 0%, transparent 70%);
    animation: drift-b 32s ease-in-out infinite;
}
.blob-c {
    width: 50vw; height: 50vw;
    bottom: -20%; left: 20%;
    background: radial-gradient(circle, #7a3410 0%, transparent 70%);
    animation: drift-c 30s ease-in-out infinite;
}
@keyframes drift-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(6%, 8%) scale(1.08); }
}
@keyframes drift-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8%, 6%) scale(0.95); }
}
@keyframes drift-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4%, -6%) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .blob { animation: none; }
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--sans);
    color: var(--ink);
    margin: 0.4em 0;
}
p { color: var(--ink-dim); line-height: 1.6; }

a {
    color: var(--accent-strong);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.link-button {
    display: inline-block;
    padding: 0.7em 1.4em;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.15s ease, background 0.15s ease;
    margin: 5px;
}
.link-button:hover {
    text-decoration: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06));
    transform: translateY(-2px);
}
.link-button:active { transform: scale(0.96); }

/* ---------- reusable glass card ---------- */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 18px;
    padding: 1.4em 1.6em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ============================================================
    WATCHYT SPECIFIC STYLES
    ============================================================ */

.app-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.controls-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.sidenote {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-dim);
}

.sidenote code {
    font-family: var(--mono);
    color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    justify-content: center;
}

.form-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    color: var(--ink);
    padding: 0.7em 1.2em;
    font-family: var(--sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.12);
}

.form-input::placeholder {
    color: var(--ink-faint);
}

.go-btn {
    margin: 0;
}

.player-card {
    width: 100%;
    display: none; /* Hidden until a video is loaded */
    padding: 12px;
}

.player-card.visible {
    display: block;
}

/* Responsive 16:9 Aspect Ratio Wrapper */
.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
