/* ==========================================================================
   style.css — 全局样式：主题变量、重置、布局、导航、首页、通用组件
   ========================================================================== */

/* ─── CSS Variables / Theme ───────────────────────────── */
:root {
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.14);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --nav-height: 64px;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --bg-input: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99,102,241,0.08);
    --accent-medium: rgba(99,102,241,0.15);
    --success: #10b981;
    --success-light: rgba(16,185,129,0.08);
    --warning: #f59e0b;
    --warning-light: rgba(245,158,11,0.08);
    --danger: #ef4444;
    --danger-light: rgba(239,68,68,0.08);
    --glass-bg: rgba(255,255,255,0.72);
    --glass-border: rgba(255,255,255,0.2);
    --hero-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --card-hover-shadow: 0 20px 50px rgba(99,102,241,0.12);
}

[data-theme="dark"] {
    --bg-primary: #0b1120;
    --bg-secondary: #151d2e;
    --bg-tertiary: #1a2332;
    --bg-elevated: #1e293b;
    --bg-input: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-inverse: #0f172a;
    --border-color: #1e293b;
    --border-light: #1a2332;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-light: rgba(129,140,248,0.08);
    --accent-medium: rgba(129,140,248,0.15);
    --success: #34d399;
    --success-light: rgba(52,211,153,0.08);
    --warning: #fbbf24;
    --warning-light: rgba(251,191,36,0.08);
    --danger: #f87171;
    --danger-light: rgba(248,113,113,0.08);
    --glass-bg: rgba(11,17,32,0.8);
    --glass-border: rgba(30,41,59,0.5);
    --hero-gradient: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #7c3aed 100%);
    --card-hover-shadow: 0 20px 50px rgba(99,102,241,0.2);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.35);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.4);
}

/* ─── View Transition for Theme Toggle ────────────────── */
::view-transition-new(root),
::view-transition-old(root) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* ─── Reduced Motion ─────────────────────────────────── */
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* ─── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--transition-normal), color var(--transition-normal);
}
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { text-decoration: none; color: inherit; }

/* ─── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ─── Focus styles (keyboard only) ────────────────────── */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Skip Link ───────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ─── Navbar ──────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow var(--transition-normal);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
/* Navbar loading progress bar */
.nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 0 1px 1px 0;
    transition: width 0.3s ease;
    width: 0%;
    z-index: 1;
}
.nav-progress.active {
    animation: navProgressShimmer 1.5s ease-in-out infinite;
}
@keyframes navProgressShimmer {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}
.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    transition: opacity var(--transition-fast);
}
.nav-logo:hover { opacity: 0.8; }
.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--hero-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.logo-text {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav Search */
.nav-search {
    flex: 1;
    max-width: 360px;
    position: relative;
    display: flex;
    align-items: center;
}
.nav-search > i {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary);
    font-size: 13px;
    pointer-events: none;
}
.nav-search input {
    width: 100%;
    height: 38px;
    padding: 0 60px 0 38px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all var(--transition-fast);
}
.nav-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-secondary);
}
.search-shortcut {
    position: absolute;
    right: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 11px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.nav-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 15px;
    position: relative;
}
.nav-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}
.lang-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.mobile-menu-btn { display: none; }

/* ─── Mobile Menu ─────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    z-index: 2000;
    transition: right var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}
.mobile-menu.open { right: 0; }
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}
.mobile-menu-header button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.mobile-menu-header button:hover { background: var(--bg-tertiary); }
.mobile-menu-search {
    padding: 12px 16px;
    position: relative;
    display: flex;
    align-items: center;
}
.mobile-menu-search i {
    position: absolute;
    left: 28px;
    color: var(--text-tertiary);
    font-size: 13px;
}
.mobile-menu-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}
.mobile-menu-items { padding: 8px 12px; flex: 1; }
.mobile-menu-items a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}
.mobile-menu-items a:hover, .mobile-menu-items a:focus-visible {
    background: var(--accent-light);
    color: var(--accent);
}
.mobile-menu-items a i { width: 20px; text-align: center; }
.mobile-menu-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    transition: all var(--transition-fast);
}
.mobile-action-btn:hover { background: var(--bg-tertiary); }
.mobile-action-btn i { width: 20px; text-align: center; }
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1999;
    backdrop-filter: blur(4px);
}
.mobile-overlay.show { display: block; }

/* ─── Command Palette ─────────────────────────────────── */
.cmd-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}
.cmd-palette-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.cmd-palette {
    width: 90%;
    max-width: 520px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: transform var(--transition-fast);
}
.cmd-palette-overlay.open .cmd-palette {
    transform: translateY(0) scale(1);
}
.cmd-palette-input-wrap {
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}
.cmd-palette-input-wrap i { color: var(--text-tertiary); font-size: 14px; flex-shrink: 0; }
.cmd-palette-input-wrap input {
    flex: 1;
    height: 52px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
}
.cmd-palette-input-wrap kbd {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 11px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.cmd-palette-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}
.cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: background var(--transition-fast);
}
.cmd-item:hover, .cmd-item.selected {
    background: var(--accent-light);
    color: var(--accent);
}
.cmd-item i { width: 18px; text-align: center; font-size: 14px; }

/* ─── Main Content ────────────────────────────────────── */
.main-content { padding-top: var(--nav-height); min-height: 100vh; }

/* ─── Page System ─────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; animation: pageIn 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(16px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.reduce-motion .page.active { animation: none; }

/* ─── Hero ────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 72px 24px 52px;
    text-align: center;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.12;
    animation: orbFloat 25s ease-in-out infinite;
}
[data-theme="dark"] .hero-orb { opacity: 0.08; }
.hero-orb-1 { width: 500px; height: 500px; background: #6366f1; top: -250px; left: -100px; }
.hero-orb-2 { width: 400px; height: 400px; background: #ec4899; top: -150px; right: -100px; animation-delay: -7s; }
.hero-orb-3 { width: 300px; height: 300px; background: #06b6d4; bottom: -100px; left: 40%; animation-delay: -14s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -25px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}
.reduce-motion .hero-orb { animation: none; }
.hero-content { position: relative; z-index: 1; max-width: 660px; margin: 0 auto; }
.hero-title { font-size: clamp(34px, 6vw, 58px); font-weight: 900; line-height: 1.15; margin-bottom: 18px; letter-spacing: -0.03em; }
.hero-title-line { display: block; }
.hero-title-highlight {
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: clamp(14px, 2vw, 17px);
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
.hero-badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-normal);
    user-select: none;
}
.hero-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.hero-badge i { color: var(--accent); font-size: 12px; }

/* ─── Studio Cards ────────────────────────────────────── */
.studio-cards {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.studio-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    /* Stagger animation */
    opacity: 0;
    transform: translateY(24px);
}
.studio-card.animate-in {
    animation: cardEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.studio-card:nth-child(1).animate-in { animation-delay: 0s; }
.studio-card:nth-child(2).animate-in { animation-delay: 0.1s; }
.studio-card:nth-child(3).animate-in { animation-delay: 0.2s; }
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(28px) scale(0.96); }
    60% { opacity: 1; transform: translateY(-4px) scale(1.01); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.reduce-motion .studio-card { opacity: 1; transform: none; animation: none !important; }
.studio-card:hover {
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-medium);
}
.studio-card-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    transition: background 0.1s ease;
}
.studio-card-content {
    position: relative;
    z-index: 1;
    padding: 32px 28px;
}
.studio-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--card-color);
    background: color-mix(in srgb, var(--card-color) 10%, transparent);
    margin-bottom: 20px;
    transition: transform var(--transition-normal);
}
.studio-card:hover .studio-card-icon { transform: scale(1.1) rotate(-3deg); }
.studio-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.studio-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 18px; }
.studio-card-features { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-tag {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}
.studio-card:hover .feature-tag { background: var(--accent-light); color: var(--accent); }
.studio-card-arrow {
    position: absolute;
    top: 28px;
    right: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-tertiary);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-normal);
}
.studio-card:hover .studio-card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent);
}

/* ─── Home Drop Hint ──────────────────────────────────── */
.home-drop-hint {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    padding: 40px 24px 24px;
    color: var(--text-tertiary);
    font-size: 13px;
}
.drop-hint-line { width: 60px; height: 1px; background: var(--border-color); }

/* ─── Footer ──────────────────────────────────────────── */
.home-footer {
    padding: 40px 24px 32px;
    text-align: center;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}
.footer-privacy i { font-size: 12px; color: var(--success); }
.footer-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}
.footer-dot { margin: 0 6px; }

/* ─── Global Drag Overlay ─────────────────────────────── */
.drag-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(99,102,241,0.06);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}
.drag-overlay.active { opacity: 1; pointer-events: auto; }
.drag-overlay-default { text-align: center; }
.drag-overlay-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: dragPulse 1.5s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(99,102,241,0.3);
}
@keyframes dragPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.drag-overlay-text { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.drag-overlay-hint { font-size: 14px; color: var(--text-secondary); }

/* Drag target selection cards */
.drag-overlay-targets {
    text-align: center;
    width: 100%;
    max-width: 720px;
    padding: 0 20px;
}
.drag-targets-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}
.drag-target-cards {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.drag-target-card {
    flex: 1;
    max-width: 200px;
    padding: 28px 16px 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    cursor: default;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.drag-target-card.drag-hover {
    border-color: var(--accent);
    border-style: solid;
    background: rgba(99,102,241,0.08);
    transform: scale(1.04);
    box-shadow: 0 8px 32px rgba(99,102,241,0.18);
}
.drag-target-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--card-color, var(--accent)) 12%, transparent);
    color: var(--card-color, var(--accent));
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drag-target-card.drag-hover .drag-target-icon {
    background: color-mix(in srgb, var(--card-color, var(--accent)) 20%, transparent);
    animation: dragPulse 1.5s ease-in-out infinite;
}
.drag-target-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.drag-target-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

@media (max-width: 480px) {
    .drag-target-cards { flex-direction: column; align-items: center; }
    .drag-target-card { max-width: 100%; width: 100%; padding: 20px 16px; }
}

/* ─── Toast ───────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    right: 20px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    color: var(--text-primary);
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}
.toast.toast-exit { animation: toastOut 0.3s ease forwards; }
.toast.success > i { color: var(--success); }
.toast.error > i { color: var(--danger); }
.toast.warning > i { color: var(--warning); }
.toast.info > i { color: var(--accent); }
/* Success icon checkmark animation */
.toast.success > i { animation: toastCheckPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both; }
@keyframes toastCheckPop {
    0% { transform: scale(0) rotate(-90deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
/* Toast auto-dismiss progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: toastProgress var(--toast-duration, 3s) linear forwards;
}
.toast:hover .toast-progress { animation-play-state: paused; }
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}
.toast-close {
    margin-left: auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-tertiary);
    font-size: 11px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.toast-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(40px) scale(0.95); } }

/* ─── Global Loader ───────────────────────────────────── */
.global-loader {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loaderOverlayIn 0.2s ease;
}
@keyframes loaderOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.loader-content {
    background: var(--bg-elevated);
    padding: 36px 44px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: loaderContentIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes loaderContentIn {
    from { opacity: 0; transform: scale(0.85) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-content p { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.loader-progress {
    width: 200px;
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}
.loader-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}
.loader-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ─── Tooltip ─────────────────────────────────────────── */
.tooltip {
    position: fixed;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    z-index: 7000;
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-4px);
    transition: opacity 0.15s ease;
    white-space: nowrap;
}
.tooltip.visible { opacity: 1; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --nav-height: 56px; }
    .nav-search { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero { padding: 48px 16px 32px; }
    .hero-badges { gap: 6px; }
    .hero-badge { padding: 6px 12px; font-size: 11px; }
    .studio-cards {
        grid-template-columns: 1fr;
        max-width: 480px;
        padding: 0 16px;
        gap: 12px;
    }
    .studio-card-content { padding: 24px 20px; }
    .home-drop-hint { padding: 28px 16px 16px; font-size: 12px; }
    .toast-container { right: 12px; left: 12px; }
    .toast { max-width: 100%; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .studio-cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 800px;
    }
    .studio-card-content { padding: 24px 20px; }
}
@media (max-width: 480px) {
    .nav-container { padding: 0 14px; }
    .logo-text { font-size: 16px; }
    .hero { padding: 36px 14px 24px; }
    .hero-desc { margin-bottom: 20px; }
}
