/* Studio layout, account offers and activity. */

:root { --download-ready-green: #c5f1a4; --download-ready-ink: #172a22; }

body.dark-theme {
  --bg-app: #0b101b;
  --bg-surface: #121b2a;
  --bg-surface-elevated: #172235;
  --bg-card: #121b2a;
  --bg-input: #101827;
  --accent-blue: #84adff;
  --accent-blue-hover: #a5c3ff;
}

.app { width: 100%; max-width: none; padding: 28px clamp(20px, 4vw, 70px) 64px; }
.app-header { padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.brand-title { letter-spacing: -.025em; }
.brand-sub { letter-spacing: .07em; text-transform: uppercase; font-size: 10px; }
.engine-badge { display: none; }
.account-nav { gap: 8px; }
.btn.btn-green, .btn.btn-primary, .account-nav a.btn-green[aria-current="page"] {
  background: var(--download-ready-green);
  color: var(--download-ready-ink);
  border: 1px solid transparent;
  box-shadow: none;
}
.btn:is(.btn-green, .btn-primary):hover:not(:disabled), .account-nav a.btn-green[aria-current="page"]:hover {
  background: color-mix(in srgb, var(--download-ready-green) 87%, white);
}
.btn.btn-danger {
  background: var(--accent-rose-dim);
  border: 1px solid color-mix(in srgb, var(--accent-rose) 40%, var(--border-medium));
  color: var(--text-primary);
}
.btn.btn-danger:hover:not(:disabled) { border-color: var(--accent-rose); }
.btn:focus-visible, .btn-icon:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.account-nav a.account-auth { margin-inline-start: auto; }
.account-quota { padding-block: 10px; }
.account-quota strong { font-size: .9rem; }
.account-quota .account-kicker { font-size: .69rem; letter-spacing: .09em; text-transform: uppercase; }

.urlbar-section {
  padding: clamp(16px, 3vw, 32px);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.download-hero {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  min-height: 278px;
  align-items: center;
  overflow: hidden;
  border-radius: 17px;
  margin-bottom: 22px;
  padding: clamp(22px, 4vw, 48px);
  color: #f5f7ff;
  background: radial-gradient(ellipse at 82% 76%, #2a3f67 0%, transparent 55%), linear-gradient(115deg, #101a30, #172a47);
}

.hero-copy { position: relative; z-index: 1; }
.hero-kicker { color: #c6d9ff; font-size: .68rem; letter-spacing: .18em; font-weight: 700; }
.hero-kicker span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--download-ready-green); }
.hero-copy h2 { margin: 8px 0 14px; font-size: clamp(2.2rem, 5vw, 4.65rem); letter-spacing: -.075em; line-height: .99; }
.hero-copy h2 em { color: var(--download-ready-green); font-style: normal; }
.hero-copy > p:last-child { color: #cfddf4; max-width: 38ch; font-size: .92rem; }
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 290px);
  aspect-ratio: 1.15;
  justify-self: center;
  color: #c5f1a4;
}

.hero-art > svg { z-index: 1; filter: drop-shadow(0 0 12px #a6f4a38a); }
.hero-orbit { position: absolute; width: 67%; aspect-ratio: 1; border: 1px solid #b1c9ff59; border-radius: 50%; }
.hero-orbit-outer { width: 89%; border-style: dashed; opacity: .48; }
.hero-format {
  position: absolute;
  z-index: 2;
  min-width: 68px;
  padding: 8px 11px;
  border: 1px solid #b9ceff66;
  border-radius: 10px;
  background: #213451;
  box-shadow: 0 5px 14px #08112066;
  color: #fff;
  font: 650 .86rem var(--font-mono);
}
.hero-format small { display: block; margin-top: 3px; color: #c6d9ff; font: .65rem var(--font-sans); }
.hero-mp4 { top: 10%; left: 8%; transform: rotate(-8deg); }
.hero-mp3 { top: 34%; right: 0; transform: rotate(8deg); }
.hero-jpg { bottom: 5%; left: 12%; transform: rotate(-5deg); }

.url-field-label { display: block; margin-bottom: 8px; color: var(--text-primary); font-weight: 650; }
.platform-ribbon { padding: 9px 0; }
.platform-ribbon .ribbon-item {
  --ink: var(--chip-light, #42556c);
  --tint: 8%;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 25%, var(--bg-surface));
  background: color-mix(in srgb, var(--ink) var(--tint), var(--bg-surface));
  border-radius: 999px; padding: 5px 10px; font-family: inherit;
}
.dark-theme .platform-ribbon .ribbon-item { --ink: var(--chip-dark, #b8c9de); --tint: 13%; }
.platform-ribbon .ribbon-item::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.platform-ribbon .ribbon-item:hover { --tint: 17%; border-color: var(--ink); }
.platform-ribbon .ribbon-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ribbon-item[data-platform="YouTube"] { --chip-light: #aa2130; --chip-dark: #ff9ca5; }
.ribbon-item[data-platform="TikTok"] { --chip-light: #006d74; --chip-dark: #75e2e4; }
.ribbon-item[data-platform="Instagram"] { --chip-light: #a02575; --chip-dark: #f3a8d9; }
.ribbon-item[data-platform="X / Twitter"] { --chip-light: #34465d; --chip-dark: #cbd5e1; }
.ribbon-item[data-platform="Threads"] { --chip-light: #6940a5; --chip-dark: #c8adff; }
.ribbon-item[data-platform="Spotify"] { --chip-light: #176540; --chip-dark: #84e8a4; }
.ribbon-item[data-platform="Envato"] { --chip-light: #546b0b; --chip-dark: #cee798; }
.ribbon-item[data-platform="Scribd"] { --chip-light: #8b4a19; --chip-dark: #f3ba88; }
.ribbon-item[data-platform="Facebook"] { --chip-light: #2158a9; --chip-dark: #a0c4ff; }
.ribbon-item[data-platform="Vimeo"] { --chip-light: #00678f; --chip-dark: #89ddf8; }
.ribbon-item[data-platform="M3U8 / DASH"] { --chip-light: #875608; --chip-dark: #f2ce84; }
.ribbon-item[data-platform=".HAR Import"] { --chip-light: #5a4f92; --chip-dark: #c9c0ff; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.dark-theme .btn-primary, body.dark-theme .btn-accent { color: #0b1730; }
.account-card { padding: clamp(16px, 3vw, 26px); }
.account-card h2, .quota-dialog h2 { font-size: clamp(1.35rem, 4vw, 2rem); letter-spacing: -.045em; }
.account-plan { padding: 18px; background: var(--bg-app); }
.account-plan-featured { border-color: var(--accent-blue); }
.account-plan strong { font-size: 1.85rem; letter-spacing: -.05em; }
.account-plan strong small { font-size: .8rem; letter-spacing: 0; }
.account-plan .btn { justify-self: start; }
.payment-qr { display: block; width: min(240px, 100%); max-height: 260px; object-fit: contain; background: white; border-radius: 10px; }
.checkout-qr { width: min(360px, 100%); max-height: 510px; }
.payment-history { list-style: none; }
.payment-status { display: inline-block; margin-top: 3px; padding: 2px 7px; border-radius: 6px; background: var(--bg-surface-elevated); }
.payment-status-active { background: var(--accent-emerald-dim); }
.payment-status-awaiting_approval { background: var(--accent-amber-dim); }
.payment-status-rejected { background: var(--accent-rose-dim); }
.payment-form { margin-top: 6px; }
.quota-dialog {
  margin: auto;
  width: min(calc(100% - 24px), 610px);
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-dropdown);
}
.quota-dialog::backdrop { background: #080c17b9; backdrop-filter: blur(4px); }
.swal2-popup.checkout-alert {
  --swal2-background: var(--bg-surface-elevated);
  --swal2-color: var(--text-primary);
  --swal2-confirm-button-background-color: var(--accent-blue);
  --swal2-confirm-button-color: var(--bg-surface);
  --swal2-cancel-button-background-color: var(--bg-surface);
  --swal2-cancel-button-color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
}
.quota-dialog-content { padding: clamp(16px, 4vw, 28px); display: grid; gap: 13px; }
.quota-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.notice-center { position: relative; }
.notice-center summary { position: relative; list-style: none; cursor: pointer; }
.notice-center summary::-webkit-details-marker { display: none; }
.notice-count { position: absolute; top: -5px; right: -5px; min-width: 15px; padding: 1px 3px; border-radius: 10px; background: #c5f1a4; color: #142526; font-size: .61rem; font-weight: 700; }
.notice-panel {
  z-index: 10;
  position: absolute;
  top: calc(100% + 10px);
  right: -28px;
  width: min(320px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--border-medium);
  border-radius: 13px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-dropdown);
}
.notice-panel h2 { font-size: 1rem; margin-bottom: 6px; }
#noticeHelp { margin: 6px 0; }
.notice-panel ul { list-style: none; max-height: min(55vh, 300px); overflow: auto; }
.notice-panel li { border-top: 1px solid var(--border-subtle); padding: 7px 4px; overflow-wrap: anywhere; }
.notice-panel li small { display: block; color: var(--text-secondary); font-size: .68rem; margin-top: 3px; }
.notice-panel li.err { border-left: 2px solid var(--accent-rose); }
.notice-panel li.ok { border-left: 2px solid var(--accent-emerald); }

.auth-layout {
  width: min(100%, 1020px); margin: clamp(10px, 3vw, 40px) auto; display: grid;
  grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--border-medium);
  border-radius: 22px; background: var(--bg-surface); box-shadow: var(--shadow-card);
}
.auth-aside {
  display: grid; align-content: center; gap: 16px; min-height: 450px; padding: clamp(22px, 4vw, 49px);
  background: radial-gradient(ellipse at 91% 80%, #33517a 0%, transparent 57%), #13213a; color: #f5f7ff;
}
.auth-aside .account-kicker { color: #c5f1a4; letter-spacing: .14em; }
.auth-aside h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; letter-spacing: -.065em; }
.auth-aside > p:last-of-type { color: #c7d7f1; max-width: 32ch; }
.auth-aside ul { display: grid; gap: 7px; list-style: none; }
.auth-aside li { display: flex; align-items: center; gap: 8px; }
.auth-aside li span { color: #c5f1a4; font-weight: 800; }
.auth-panel { display: grid; align-content: center; gap: 9px; min-width: 0; padding: clamp(20px, 4vw, 45px); }
.auth-panel h2 { letter-spacing: -.045em; line-height: 1.12; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.auth-panel .account-form { margin-top: 8px; max-width: none; gap: 10px; }
.auth-password { display: flex; gap: 5px; align-items: center; }
.auth-password input { width: 100%; min-width: 0; }
.auth-help { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.auth-help code { color: var(--text-primary); white-space: nowrap; }
.user-overview { display: grid; gap: 13px; }
.user-banner {
  padding: clamp(20px, 4vw, 38px); border-radius: 18px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 15px; background: linear-gradient(115deg, #13233c, #29466e); color: #f5f7ff;
}
.user-banner .account-kicker { color: #c5f1a4; letter-spacing: .14em; }
.user-banner h1 { font-size: clamp(1.8rem, 4vw, 2.95rem); letter-spacing: -.06em; overflow-wrap: anywhere; }
.user-banner p { color: #d0def7; }
.user-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.user-metrics article {
  display: grid; gap: 6px; padding: 15px; background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: 12px;
}
.user-metrics article :is(span, small) { color: var(--text-secondary); }
.user-metrics article strong { font-size: clamp(1.3rem, 3vw, 1.85rem); letter-spacing: -.035em; }
.user-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; }
.user-activity-heading { padding-top: 12px; scroll-margin-top: 16px; }
#paket { scroll-margin-top: 16px; }

@media (max-width: 600px) {
  .app { padding-inline: 14px; }
  .download-hero { min-height: 234px; grid-template-columns: 1fr; padding-right: 50px; }
  .hero-art { position: absolute; right: -68px; bottom: -24px; width: 170px; opacity: .42; }
  .hero-format { display: none; }
  .app-header .conn-badge { display: none; }
  .account-quota { gap: 5px 12px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); margin-block: 8px; }
  .auth-aside { min-height: 0; gap: 10px; }
  .auth-aside ul { display: none; }
  .user-metrics { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1200px) {
  .download-hero { grid-template-columns: 1fr minmax(280px, .6fr); }
  .task-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-list > * { min-width: 0; }
}
