/* ============================================================================
   SPACEBYTE CLOUD SHARE — MAIN STYLES
   Sky-blue gradient theme · light default · dark toggle · animations
   ========================================================================== */

/* ------------------------------- THEMES ---------------------------------- */
:root {
  --brand: #0ea5e9;
  --brand-2: #38bdf8;
  --brand-3: #6366f1;
  --accent: #22d3ee;
  --grad-main: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 45%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, rgba(14,165,233,.14), rgba(99,102,241,.14));
  --grad-text: linear-gradient(120deg, #0284c7, #0ea5e9 45%, #6366f1);
  --grad-danger: linear-gradient(135deg, #ef4444, #f97316);

  --bg: #eef6fd;
  --bg-2: #f7fbfe;
  --card: #ffffff;
  --card-2: #f8fafc;
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #dbeafe;
  --shadow-sm: 0 2px 10px rgba(14,116,144,.08);
  --shadow: 0 12px 32px rgba(14,116,144,.14);
  --shadow-lg: 0 24px 60px rgba(14,116,144,.22);
  --ring: 0 0 0 3px rgba(14,165,233,.18);
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  --nav-h: 64px;
  --radius: 16px;
}
[data-theme="dark"] {
  --bg: #070d1a;
  --bg-2: #0b1424;
  --card: #0e1830;
  --card-2: #131f3c;
  --ink: #e8f1fb;
  --ink-2: #a8c0d8;
  --muted: #7d95b5;
  --line: #1c2a4a;
  --line-2: #24365e;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
  --shadow: 0 12px 32px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
  --grad-soft: linear-gradient(135deg, rgba(14,165,233,.1), rgba(99,102,241,.1));
  --grad-text: linear-gradient(120deg, #38bdf8, #60a5fa 45%, #a5b4fc);
}
[data-theme="dark"] .bg-orbs .orb { opacity: .25; }

/* -------------------------------- BASE ----------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .35s, color .35s;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: rgba(14,165,233,.25); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-2); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
[hidden] { display: none !important; }

/* ------------------------------- BACKDROP --------------------------------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-orbs .orb {
  position: absolute; border-radius: 50%; filter: blur(70px);
  background: var(--grad-main); opacity: .16; animation: drift 18s ease-in-out infinite;
}
.o1 { width: 480px; height: 480px; top: -140px; left: -120px; }
.o2 { width: 420px; height: 420px; bottom: -140px; right: -100px; animation-delay: -7s; }
.o3 { width: 300px; height: 300px; top: 38%; left: 55%; opacity: .1; animation-delay: -12s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(46px, -34px) scale(1.08); }
}

/* ------------------------------- NAVBAR ----------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background .35s;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-ic {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad-main);
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 8px 20px rgba(14,165,233,.4);
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.brand-txt b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; display: block; line-height: 1.1; }
.brand-txt small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a {
  padding: 8px 15px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: .2s;
}
.nav-links a:hover { background: var(--grad-soft); color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; font-size: 17px;
  background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--brand-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 13px; font-weight: 700; font-size: 14px;
  background: var(--grad-main); color: #fff; transition: .22s;
  box-shadow: 0 8px 22px rgba(14,165,233,.32); white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); box-shadow: 0 12px 28px rgba(14,165,233,.4); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost {
  background: var(--card); color: var(--ink-2); border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--brand-2); color: var(--brand); filter: none; }
.btn.outline {
  background: transparent; border: 2px solid var(--brand-2); color: var(--brand);
  box-shadow: none;
}
.btn.outline:hover { background: var(--grad-soft); }
.btn.danger { background: var(--grad-danger); box-shadow: 0 8px 22px rgba(220,38,38,.28); }
.btn.sm { padding: 7px 14px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; pointer-events: none; }
.burger { display: none; font-size: 22px; padding: 6px 10px; }
.mobile-menu {
  display: none; flex-direction: column; padding: 8px 18px 18px; gap: 4px;
  border-top: 1px solid var(--line); background: var(--bg);
}
.mobile-menu.open { display: flex; animation: slideDown .28s ease both; }
.mobile-menu a { padding: 12px 10px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.mobile-menu a:hover { background: var(--grad-soft); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ------------------------------- HERO / LANDING --------------------------- */
.hero {
  position: relative; text-align: center; padding: 90px 22px 60px; overflow: hidden;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700;
  color: var(--brand); box-shadow: var(--shadow-sm); margin-bottom: 24px;
  animation: fadeUp .7s .1s both;
}
.hero-badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 64px); font-weight: 900; letter-spacing: -.035em; line-height: 1.08;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fadeUp .7s .18s both;
}
.hero p.lead {
  max-width: 620px; margin: 20px auto 0; font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-2); line-height: 1.7; animation: fadeUp .7s .26s both;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; animation: fadeUp .7s .34s both; }
.hero-metrics {
  display: flex; gap: 34px; justify-content: center; margin-top: 54px; flex-wrap: wrap;
  animation: fadeUp .7s .42s both;
}
.hero-metrics .m b { font-size: 26px; font-weight: 900; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-metrics .m span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.hero-visual { margin: 64px auto 0; max-width: 920px; animation: fadeUp .8s .5s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero-mock {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 18px; box-shadow: var(--shadow-lg);
  transform: perspective(1100px) rotateX(5deg);
}
.hero-mock .mock-bar { display: flex; gap: 7px; margin-bottom: 14px; }
.hero-mock .mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.hero-mock .mock-bar i:first-child { background: #f87171; }
.hero-mock .mock-bar i:nth-child(2) { background: #fbbf24; }
.hero-mock .mock-bar i:nth-child(3) { background: #34d399; }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mock-file {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; text-align: center; animation: floaty 6s ease-in-out infinite;
}
.mock-file:nth-child(2n) { animation-delay: -2s; }
.mock-file:nth-child(3n) { animation-delay: -4s; }
.mock-file .f-ic {
  width: 46px; height: 46px; margin: 0 auto 9px; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px;
}
.mock-file b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-file span { font-size: 10.5px; color: var(--muted); }
.f-ic.img { background: linear-gradient(135deg,#a5f3fc,#67e8f9); }
.f-ic.doc { background: linear-gradient(135deg,#bfdbfe,#93c5fd); }
.f-ic.vid { background: linear-gradient(135deg,#ddd6fe,#c4b5fd); }
.f-ic.pdf { background: linear-gradient(135deg,#fecaca,#fca5a5); }
.f-ic.aud { background: linear-gradient(135deg,#bbf7d0,#86efac); }
.f-ic.zip { background: linear-gradient(135deg,#fde68a,#fcd34d); }
.f-ic.txt { background: linear-gradient(135deg,#e2e8f0,#cbd5e1); }
.f-ic.folder { background: linear-gradient(135deg,#7dd3fc,#38bdf8); }

/* ----------------------------- SECTION / FEATURES ------------------------- */
.section { max-width: 1180px; margin: 0 auto; padding: 72px 22px; }
.sec-head { text-align: center; margin-bottom: 46px; }
.sec-head .kicker {
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; letter-spacing: -.03em; }
.sec-head p { max-width: 560px; margin: 14px auto 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 20px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: .28s; position: relative; overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-main); transform: scaleX(0); transform-origin: left; transition: .35s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature:hover::before { transform: scaleX(1); }
.feature .f-ic {
  width: 50px; height: 50px; border-radius: 14px; background: var(--grad-soft);
  display: grid; place-items: center; font-size: 22px; margin-bottom: 16px;
  border: 1px solid var(--line-2);
}
.feature h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
[data-anim] { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s; }
[data-anim].in { opacity: 1; transform: none; }

/* ------------------------------- PRICING ----------------------------------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: stretch; }
.plan {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 30px 26px; display: flex; flex-direction: column; transition: .3s;
}
.plan:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.plan.featured {
  border: 2px solid transparent; background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--grad-main) border-box;
  box-shadow: var(--shadow-lg);
}
.plan .flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad-main); color: #fff; font-size: 11px; font-weight: 800;
  padding: 5px 16px; border-radius: 99px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(14,165,233,.4);
}
.plan h3 { font-size: 17px; font-weight: 800; }
.plan .price { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 4px; }
.plan .price b { font-size: 40px; font-weight: 900; letter-spacing: -.03em; }
.plan .price span { color: var(--muted); font-size: 13.5px; }
.plan .per { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.plan ul { list-style: none; margin-bottom: 24px; flex: 1; }
.plan ul li { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; font-size: 13.5px; color: var(--ink-2); }
.plan ul li::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* --------------------------------- AUTH ------------------------------------ */
.auth-wrap { max-width: 430px; margin: 0 auto; padding: 60px 18px 40px; }
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 36px 30px; box-shadow: var(--shadow-lg); animation: pop .5s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(16px); } to { opacity: 1; transform: none; } }
.auth-card h2 { font-size: 23px; font-weight: 900; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: var(--card-2); border: 1.5px solid var(--line); color: var(--ink);
  outline: none; transition: .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: var(--ring); background: var(--card);
}
.auth-card .btn { width: 100%; padding: 13px; font-size: 14.5px; margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.auth-alt b { color: var(--brand); cursor: pointer; }
.err-box {
  display: none; background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.28);
  color: var(--danger); padding: 11px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 15px;
}
.plan-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.plan-pill.free { background: rgba(100,116,139,.14); color: var(--muted); }
.plan-pill.pro { background: rgba(14,165,233,.14); color: var(--brand); }
.plan-pill.business { background: rgba(99,102,241,.16); color: var(--brand-3); }

/* ------------------------------ DRIVE LAYOUT ------------------------------- */
.drive { max-width: 1280px; margin: 0 auto; padding: 20px 22px 80px; }
.drive-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.drive-head h2 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.breadcrumbs a { color: var(--brand); font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.breadcrumbs a:hover { background: var(--grad-soft); }
.breadcrumbs .sep { opacity: .5; }

.drive-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.sidebar {
  position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 4px;
}
.side-nav {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 14px;
  border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: .2s;
  border: none; background: none; text-align: left;
}
.side-nav:hover { background: var(--card); box-shadow: var(--shadow-sm); color: var(--ink); }
.side-nav.active { background: var(--grad-main); color: #fff; box-shadow: 0 8px 20px rgba(14,165,233,.35); }
.side-nav .n-ic { font-size: 17px; width: 22px; text-align: center; }
.side-nav .n-count { margin-left: auto; font-size: 11px; background: var(--grad-soft); padding: 2px 8px; border-radius: 99px; font-weight: 800; color: var(--brand); }
.side-nav.active .n-count { background: rgba(255,255,255,.22); color: #fff; }

.storage-card {
  margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow-sm);
}
.storage-card .s-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 9px; color: var(--ink-2); }
.storage-card .s-head span:last-child { color: var(--brand); }
.storage-bar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; border: 1px solid var(--line); }
.storage-bar i { display: block; height: 100%; border-radius: 99px; background: var(--grad-main); transition: width .8s cubic-bezier(.2,.9,.3,1); width: 0; }
.storage-card .s-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--muted); }
.storage-card .upgrade { margin-top: 12px; width: 100%; }

.main-col { min-width: 0; }
.toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 12px; font-size: 13.5px;
  background: var(--card-2); border: 1.5px solid var(--line); color: var(--ink); outline: none; transition: .2s;
}
.search-box input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.search-box::before {
  content: "🔍"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .55;
}
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 11px;
  font-size: 12.5px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line); transition: .2s;
}
.tool-btn:hover { border-color: var(--brand-2); color: var(--brand); transform: translateY(-1px); }
.view-toggle { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.view-toggle button { width: 34px; height: 30px; border-radius: 8px; font-size: 13px; transition: .2s; }
.view-toggle button.active { background: var(--grad-main); color: #fff; box-shadow: 0 4px 10px rgba(14,165,233,.3); }

.select-bar {
  display: none; align-items: center; gap: 10px; background: var(--grad-soft);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px;
  animation: slideDown .25s ease both;
}
.select-bar.show { display: flex; flex-wrap: wrap; }
.select-bar b { font-size: 13px; }
.select-bar .spacer { flex: 1; }

/* ------------------------------ FILE GRID / LIST --------------------------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.file-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; cursor: pointer; transition: .22s; animation: fadeUp .4s both;
  user-select: none;
}
.file-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-2); }
.file-card.selected { border-color: var(--brand); box-shadow: var(--ring), var(--shadow); }
.file-card.selected::after {
  content: "✓"; position: absolute; top: 9px; right: 9px; width: 22px; height: 22px;
  background: var(--grad-main); color: #fff; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; animation: pop .25s both;
}
.file-card .fc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.file-card .fc-ic { font-size: 34px; line-height: 1; transition: .25s; }
.file-card:hover .fc-ic { transform: scale(1.14) rotate(-4deg); }
.file-card .fc-star {
  font-size: 15px; opacity: 0; transition: .2s; color: var(--muted);
}
.file-card:hover .fc-star, .file-card.starred .fc-star { opacity: 1; }
.file-card.starred .fc-star { color: #f59e0b; }
.file-card b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.file-card span { font-size: 11.5px; color: var(--muted); }
.file-card .fc-menu {
  position: absolute; bottom: 12px; right: 12px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-size: 15px; opacity: 0; background: var(--card-2);
  border: 1px solid var(--line); transition: .2s;
}
.file-card:hover .fc-menu { opacity: 1; }
.file-card .fc-menu:hover { background: var(--grad-main); color: #fff; }

.file-list { display: flex; flex-direction: column; gap: 6px; }
.list-row {
  display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: .2s;
  animation: fadeUp .4s both;
}
.list-row:hover { box-shadow: var(--shadow-sm); border-color: var(--brand-2); transform: translateX(3px); }
.list-row.selected { border-color: var(--brand); background: var(--grad-soft); }
.list-row .lr-ic { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--card-2); flex-shrink: 0; }
.list-row .lr-name { flex: 1; min-width: 0; }
.list-row .lr-name b { font-size: 13.5px; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-name span { font-size: 11.5px; color: var(--muted); }
.list-row .lr-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.list-row .lr-star { font-size: 16px; color: var(--muted); opacity: 0; transition: .2s; }
.list-row:hover .lr-star { opacity: 1; }
.list-row.starred .lr-star { opacity: 1; color: #f59e0b; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); animation: fadeUp .5s both; }
.empty-state .e-ic { font-size: 52px; margin-bottom: 14px; opacity: .7; }
.empty-state h3 { color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--card-2) 25%, var(--line) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* -------------------------------- MODALS ----------------------------------- */
.modal-backdrop, .sheet-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(2, 10, 25, .55);
  backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-backdrop.show, .sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 210; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.96);
  width: min(560px, calc(100vw - 32px)); max-height: min(84vh, 700px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); padding: 26px; opacity: 0; pointer-events: none;
  transition: .28s cubic-bezier(.2,.9,.3,1.15);
}
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; transition: .2s; }
.modal-close:hover { background: var(--grad-danger); color: #fff; }
.modal .field label { font-size: 12.5px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toggle-row b { font-size: 13.5px; }
.toggle-row span { font-size: 12px; color: var(--muted); display: block; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: .25s; cursor: pointer;
}
.switch i::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .25s; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.switch input:checked + i { background: var(--grad-main); }
.switch input:checked + i::after { transform: translateX(20px); }

.share-url {
  display: flex; gap: 8px; align-items: center; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px; margin-top: 12px;
}
.share-url code { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  background: var(--grad-soft); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600;
}
.chip .x { cursor: pointer; font-weight: 800; opacity: .6; }
.chip .x:hover { color: var(--danger); opacity: 1; }
.perms { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.perm {
  padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer;
  background: var(--card-2); border: 1.5px solid var(--line); transition: .2s; color: var(--muted);
}
.perm.on { background: var(--grad-main); color: #fff; border-color: transparent; }

.folder-tree { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.folder-tree .ft-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  cursor: pointer; font-size: 13.5px; font-weight: 600; transition: .15s;
}
.folder-tree .ft-item:hover { background: var(--card-2); }
.folder-tree .ft-item.selected { background: var(--grad-soft); color: var(--brand); }
.folder-tree .ft-item .ft-caret { cursor: pointer; font-size: 11px; width: 16px; opacity: .6; }
.folder-tree .ft-item .ft-children { margin-left: 22px; }
.ft-children { display: flex; flex-direction: column; margin-left: 24px; }

/* ------------------------------ CONTEXT MENU ------------------------------- */
.ctx-menu {
  position: fixed; z-index: 300; min-width: 200px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; transform: scale(.92);
  pointer-events: none; transition: .16s cubic-bezier(.2,.9,.3,1.2);
}
.ctx-menu.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.ctx-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: left; transition: .15s;
}
.ctx-item:hover { background: var(--grad-soft); color: var(--brand); }
.ctx-item.danger:hover { background: rgba(220,38,38,.1); color: var(--danger); }
.ctx-sep { height: 1px; background: var(--line); margin: 5px 8px; }

/* --------------------------------- TOASTS ---------------------------------- */
.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px; background: var(--ink); color: var(--bg-2);
  padding: 13px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 16px 40px rgba(0,0,0,.3); animation: toastIn .4s cubic-bezier(.2,.9,.3,1.3) both;
}
.toast.err { background: linear-gradient(135deg,#7f1d1d,#991b1b); }
.toast.ok { background: linear-gradient(135deg,#065f46,#047857); }
.toast.leaving { animation: toastOut .3s ease both; }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ------------------------------ UPLOAD PANEL -------------------------------- */
.upload-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 240; width: min(360px, calc(100vw - 40px));
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(140%);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.1);
}
.upload-panel.show { transform: none; }
.up-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--grad-main); color: #fff; }
.up-head b { font-size: 14px; }
.up-head button { color: #fff; font-size: 12px; font-weight: 700; opacity: .85; padding: 4px 8px; border-radius: 8px; }
.up-head button:hover { opacity: 1; background: rgba(255,255,255,.15); }
.up-list { max-height: 300px; overflow-y: auto; }
.up-item { padding: 11px 16px; border-bottom: 1px solid var(--line); }
.up-item .up-top { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.up-item .up-top .u-ic { font-size: 18px; }
.up-item .up-top b { flex: 1; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-item .up-top span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.up-item .up-top button { color: var(--danger); font-size: 12px; padding: 3px 6px; border-radius: 6px; }
.up-bar { height: 5px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.up-bar i { display: block; height: 100%; background: var(--grad-main); border-radius: 99px; transition: width .25s; width: 0; }
.up-item.done .up-bar i { background: linear-gradient(135deg,#059669,#10b981); }
.up-item.err .up-top b { color: var(--danger); }

/* ------------------------------ DROP ZONE ----------------------------------- */
.drop-zone {
  position: fixed; inset: 12px; z-index: 400; border-radius: 22px; border: 2.5px dashed var(--brand);
  background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(8px);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: .25s;
}
.drop-zone.show { opacity: 1; pointer-events: auto; }
.dz-inner { text-align: center; }
.dz-ic { font-size: 54px; margin-bottom: 12px; animation: floaty 3s ease-in-out infinite; }
.dz-inner b { display: block; font-size: 20px; font-weight: 900; margin-bottom: 5px; }
.dz-inner span { color: var(--muted); font-size: 14px; }

/* ------------------------------ LIGHTBOX ------------------------------------ */
.lightbox {
  position: fixed; inset: 0; z-index: 260; background: rgba(2, 8, 20, .92);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 60px 18px 20px; animation: fadeIn .25s both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox.show { display: flex; }
.lb-close {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 17px; transition: .2s;
}
.lb-close:hover { background: var(--grad-danger); transform: rotate(90deg); }
.lb-body { max-width: 100%; max-height: calc(100vh - 150px); display: grid; place-items: center; }
.lb-body img, .lb-body video, .lb-body audio, .lb-body iframe { max-width: 100%; max-height: calc(100vh - 170px); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-body video { background: #000; }
.lb-info { margin-top: 16px; color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600; display: flex; gap: 18px; align-items: center; }
.lb-info button { color: var(--brand-2); font-weight: 700; }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px;
  border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 18px; transition: .2s;
}
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }

/* ------------------------------ CHECKOUT / MISC ------------------------------ */
.checkout-note { text-align: center; padding: 70px 20px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%;
  border: 4px solid var(--line-2); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  background: var(--card); border-top: 1px solid var(--line); padding: 44px 22px 30px; text-align: center;
}
.footer b { font-size: 15px; }
.footer p { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.f-links { display: flex; gap: 18px; justify-content: center; margin: 18px 0; }
.f-links a { font-size: 13px; font-weight: 600; color: var(--ink-2); transition: .2s; }
.f-links a:hover { color: var(--brand); }
.f-copy { margin-top: 20px; font-size: 11.5px; }

/* ------------------------------ ANIM HELPERS -------------------------------- */
.badge-float { display: inline-block; animation: floaty 4s ease-in-out infinite; }
.shimmer-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 1024px) {
  .drive-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; overflow-x: auto; gap: 8px; }
  .side-nav { width: auto; white-space: nowrap; }
  .storage-card { display: none; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .hero { padding: 64px 18px 40px; }
  .hero-mock { transform: none; }
  .section { padding: 50px 18px; }
  .drive { padding: 14px 14px 100px; }
  .toast-stack { left: 16px; right: 16px; }
  .toast { justify-content: center; }
  .lb-prev, .lb-next { display: none; }
  .footer { padding-bottom: 90px; }
}
