* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --surface: #ffffff;
    --surface-hover: #f9f9f9;
    --border-light: #eaeaea;
    --border-medium: #ddd;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --accent: #111111;
    --accent-hover: #333;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: 272px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}
.sidebar.collapsed { width: 0; overflow: hidden; }

.sidebar-brand {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 11px;
}
.brand-icon {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.5px;
}
.brand-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}
.brand-text span { color: var(--text-tertiary); font-weight: 500; }

.new-chat-btn {
    margin: 0 14px 16px;
    width: calc(100% - 28px);
    padding: 13px 18px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.2px;
}
.new-chat-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.nav-section {
    flex: 1;
    overflow-y: auto;
    padding: 4px 10px;
}
.nav-section::-webkit-scrollbar { width: 5px; }
.nav-section::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-item.active { background: var(--bg-tertiary); color: var(--text-primary); font-weight: 600; }
.nav-item svg { width: 19px; height: 19px; opacity: 0.65; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.nav-divider { height: 1px; background: var(--border-light); margin: 14px 14px; }

.history-list { margin-top: 6px; }
.history-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.history-item:hover { background: var(--bg-tertiary); color: var(--text-secondary); }
.history-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.history-del {
    opacity: 0; background: none; border: none;
    color: var(--text-tertiary); cursor: pointer;
    font-size: 15px; padding: 2px 4px; border-radius: 4px;
    transition: all 0.15s;
}
.history-item:hover .history-del { opacity: 1; }
.history-del:hover { color: #ef4444; background: #fef2f2; }

.sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid var(--border-light);
}
.user-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}
.user-row:hover { background: var(--bg-tertiary); }
.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #111, #444);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-plan { font-size: 11px; color: var(--text-tertiary); }

/* ===== 主内容 ===== */
.main-content {
    flex: 1; display: flex; flex-direction: column;
    min-width: 0; background: var(--bg-secondary);
}

.top-bar {
    height: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; padding: 0 28px; gap: 16px;
    flex-shrink: 0;
}
.menu-toggle {
    width: 38px; height: 38px;
    background: none; border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.menu-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.top-title { font-size: 16px; font-weight: 650; letter-spacing: -0.3px; }

.page-area {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column;
}
.page-area::-webkit-scrollbar { width: 6px; }
.page-area::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }

/* ===== 首页 ===== */
.home-page {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px 28px;
}

.home-header {
    text-align: center; margin-bottom: 52px;
}
.home-header h1 {
    font-size: 36px; font-weight: 800;
    letter-spacing: -1.2px; line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.home-header p {
    font-size: 16px; color: var(--text-tertiary);
    font-weight: 400; max-width: 420px; margin: 0 auto;
    line-height: 1.55;
}

/* ===== 核心输入区域 ===== */
.input-container {
    width: 100%; max-width: 720px;
}

.input-container.moved-down {
    margin-top: 32px;
    animation: slideUpFade 0.4s ease both;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.float-create-btn {
    position: fixed; bottom: 28px; right: 28px;
    z-index: 100; display: none; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 50px;
    background: #1a1a2e; color: #e0e0ff;
    font-size: 14px; font-weight: 600;
    border: 1px solid #2a2a4a; cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    font-family: inherit; transition: all 0.3s ease;
}
.float-create-btn.show { display: flex; animation: floatIn 0.35s ease both; }
.float-create-btn:hover {
    transform: translateY(-2px);
    background: #252545; border-color: #3a3a5a; color: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.input-box {
    background: var(--surface);
    border: 1.5px solid #2a2a3a;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) inset;
    transition: all 0.25s ease;
    overflow: hidden;
}
.input-box:focus-within {
    border-color: #3a3a5a;
    box-shadow: 0 0 0 3px rgba(42,42,58,0.15), 0 1px 4px rgba(0,0,0,0.08) inset;
}

/* ===== 输入框顶部：上传区域 ===== */
.upload-strip {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px 14px;
    min-height: 0;
}

.upload-label {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; flex-shrink: 0;
    transition: all 0.2s;
    user-select: none;
}
.upload-label:hover { opacity: 0.8; }
.upload-icon {
    width: 40px; height: 40px;
    background: #1e1e2e;
    border: 1.5px solid #2e2e40;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #b0b0cc;
    font-size: 19px;
    transition: all 0.22s;
}
.upload-label:hover .upload-icon {
    background: #28283c;
    border-color: #3e3e55;
    transform: translateY(-1px);
}
.upload-text {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.15px;
}
.upload-sub {
    font-size: 11px; color: var(--text-tertiary); font-weight: 400;
}

.preview-chip {
    position: relative; width: 64px; height: 64px;
    border-radius: var(--radius-sm); overflow: hidden;
    border: 1.5px solid var(--border-medium);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.preview-chip img { width: 100%; height: 100%; object-fit: cover; }
.preview-chip .chip-rm {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    border: none; border-radius: 50%;
    color: #ef4444; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.85);
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    font-weight: 700;
}
.preview-chip:hover .chip-rm { opacity: 1; transform: scale(1); }

.upload-trigger {
    width: 60px; height: 60px;
    border: 2px dashed #2e2e40;
    border-radius: var(--radius-sm);
    background: #1a1a28;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.22s;
    flex-shrink: 0;
    color: #8888aa;
    font-size: 24px;
}
.upload-trigger:hover {
    border-color: #4a4a65;
    color: #b0b0cc;
    background: #222236;
    transform: translateY(-1px);
}

/* ===== 中间：输入行 ===== */
.main-input-row {
    display: flex; align-items: flex-end;
    padding: 4px 20px 16px; gap: 10px;
}

.main-textarea {
    flex: 1;
    background: none; border: none; outline: none;
    font-size: 16px; line-height: 1.65;
    resize: none;
    min-height: 28px; max-height: 200px;
    padding: 6px 0;
    color: var(--text-primary);
    font-family: inherit;
    overflow-y: auto;
}
.main-textarea::placeholder { color: var(--text-tertiary); }
.main-textarea::-webkit-scrollbar { width: 4px; }
.main-textarea::-webkit-scrollbar-thumb { background: #e0dde8; border-radius: 3px; }

.send-btn {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #111, #333);
    border: none; border-radius: var(--radius-sm);
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: all 0.22s;
    flex-shrink: 0;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(17,17,17,0.2);
}
.send-btn:hover:not(:disabled) { 
    background: linear-gradient(135deg, #222, #444); 
    transform: scale(1.06); 
    box-shadow: 0 4px 16px rgba(17,17,17,0.28);
}
.send-btn:active:not(:disabled) { transform: scale(0.97); }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.send-btn.spin { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 底部：提示 + 尺寸选择 ===== */
.input-hint {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px 18px;
    font-size: 12px; color: var(--text-tertiary);
}

.size-picker {
    appearance: none;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px 24px 6px 12px;
    font-size: 12px; color: var(--text-secondary);
    cursor: pointer; font-family: inherit;
    transition: all 0.18s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239ca3af' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
}
.size-picker:hover { border-color: var(--border-medium); color: var(--text-primary); background-color: #ebebeb; }
.size-picker option { background: white; }

/* ===== 结果区 ===== */
.result-wrap {
    width: 100%; max-width: 800px;
    margin: 36px auto 60px; padding: 0 20px;
    display: none;
}
.result-wrap.show { display: block; animation: slideUp 0.45s ease-out; }
@keyframes slideUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }

.result-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.rc-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px; border-bottom: 1px solid var(--border-light);
}
.rc-prompt {
    font-size: 14px; color: var(--text-secondary);
    flex: 1; min-width: 0; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.rc-badge {
    padding: 5px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    flex-shrink: 0; margin-left: 14px;
    letter-spacing: 0.3px;
}
.rc-badge.gen { background: #eff6ff; color: #2563eb; }
.rc-badge.ok { background: #f0fdf4; color: #16a34a; }
.rc-badge.err { background: #fef2f2; color: #dc2626; }

.rc-body {
    background: var(--bg-tertiary);
    min-height: 200px; display: flex; align-items: center; justify-content: center;
    position: relative;
}
.rc-body img {
    max-width: 100%; max-height: min(550px, 60vh);
    object-fit: contain; border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.rc-body img:hover { transform: scale(1.02); }
.rc-body img:active { transform: scale(0.98); }
.loader-box {
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.loader-ring {
    width: 44px; height: 44px;
    border: 3px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}
.loader-txt { font-size: 14px; color: var(--text-tertiary); }
.loader-dots::after {
    content:''; animation: dotAnim 1.6s steps(4) infinite;
}
@keyframes dotAnim { 0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'} }

.rc-actions {
    display: flex; gap: 8px; padding: 16px 22px;
    border-top: 1px solid var(--border-light); justify-content: center;
}
.act-btn {
    padding: 9px 20px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: transparent; color: var(--text-secondary);
    font-size: 13px; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.18s; font-family: inherit;
}
.act-btn:hover { border-color: var(--text-primary); color: var(--text-primary); background: var(--bg-tertiary); }
.act-btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.act-btn.primary:hover { background: var(--accent-hover); }
.act-btn.dark { background: #1a1a2e; color: #e0e0ff; border-color: #2a2a4a; }
.act-btn.dark:hover { background: #252545; border-color: #3a3a5a; color: #fff; }

/* ===== 我的作品 ===== */
.works-page { flex: 1; padding: 32px 28px; display: none; }
.works-page.show { display: block; }
.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.w-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); overflow: hidden;
    transition: all 0.22s; cursor: pointer;
}
.w-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-medium); }
.w-card-img { aspect-ratio:1; background: var(--bg-tertiary); overflow:hidden; }
.w-card-img img { width:100%; height:100%; object-fit:cover; transition:transform 0.35s; }
.w-card:hover .w-card-img img { transform:scale(1.06); }
.w-card-info { padding: 14px 16px; }
.w-card-prompt { font-size: 13px; font-weight: 500; color: var(--text-primary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-bottom:5px; }
.w-card-date { font-size: 11px; color: var(--text-tertiary); }
.empty-state { text-align:center; padding:90px 20px; color: var(--text-tertiary); }
.empty-icon { font-size:52px; margin-bottom:16px; opacity:0.35; }
.empty-t { font-size:18px; font-weight:650; color:var(--text-primary); margin-bottom:8px; }
.empty-d { font-size:14px; }

/* ===== 画廊 ===== */
.gallery-page { flex:1; padding:32px 28px; display:none; }
.gallery-page.show { display:block; }
.g-masonry { columns:3; column-gap:16px; }
.g-item { break-inside:avoid; margin-bottom:16px; border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--border-light); background:var(--surface); transition:all 0.25s; cursor:pointer; }
.g-item:hover { transform:scale(1.02); box-shadow:var(--shadow-md); }
.g-item img { width:100%; display:block; }
.g-cap { padding:10px 14px; font-size:12px; color:var(--text-tertiary); }

/* ===== 设置 ===== */
.settings-page { flex:1; padding:32px 28px; display:none; }
.settings-page.show { display:block; }
.set-block { background:var(--surface); border:1px solid var(--border-light); border-radius:var(--radius-md); padding:24px 28px; margin-bottom:16px; }
.set-block h3 { font-size:15px; font-weight:650; color:var(--text-primary); margin-bottom:18px; }
.set-row { display:flex; justify-content:space-between; align-items:center; padding:14px 0; border-bottom:1px solid var(--border-light); }
.set-row:last-child{border:none}
.set-lbl {font-size:14px;font-weight:500;color:var(--text-primary)}
.set-desc {font-size:12px;color:var(--text-tertiary);margin-top:3px}
.togg {width:46px;height:26px;background:var(--border-light);border-radius:13px;position:relative;cursor:pointer;transition:all 0.25s;flex-shrink:0}
.togg.on {background:var(--accent)}
.togg::after {content:'';position:absolute;width:20px;height:20px;background:white;border-radius:50%;top:3px;left:3px;transition:all 0.25s;box-shadow:0 1px 3px rgba(0,0,0,0.15)}
.togg.on::after {left:23px}

#fileInput {display:none}
.mobile-mask {display:none;position:fixed;inset:0;background:rgba(0,0,0,0.35);z-index:999}
.mobile-mask.show {display:block}

@media (max-width:768px) {
    .sidebar {position:fixed;left:0;top:0;bottom:0;z-index:1000;transform:translateX(-100%)}
    .sidebar.open {transform:translateX(0)}
    .home-header h1 {font-size:26px}
    .home-header p {font-size:14px}
    .input-container {max-width:100%}
    .g-masonry {columns:2}
    .w-grid {grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
}
@media (max-width:480px) {
    .g-masonry {columns:1}
    .home-page {padding:28px 16px}
    .top-bar {padding:0 16px}
}

/* ===== 认证弹窗 ===== */
.auth-mask {
    display:none;position:fixed;inset:0;
    background:rgba(0,0,0,0.25);backdrop-filter:blur(6px);
    z-index:2000;transition:opacity 0.3s
}
.auth-mask.show {display:block}

.auth-modal {
    display:none;position:fixed;top:50%;left:50%;
    transform:translate(-50%,-50%) scale(0.96);
    width:420px;max-width:92vw;
    background:var(--surface);border:1px solid var(--border-light);
    border-radius:var(--radius-xl);z-index:2001;
    box-shadow:var(--shadow-lg);
    overflow:hidden;opacity:0;transition:all 0.35s cubic-bezier(0.4,0,0.2,1)
}
.auth-modal.show {
    display:block;opacity:1;transform:translate(-50%,-50%) scale(1)
}

.auth-close {
    position:absolute;top:14px;right:16px;z-index:5;
    width:32px;height:32px;background:none;border:none;
    color:var(--text-tertiary);font-size:20px;cursor:pointer;
    border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;
    transition:all 0.2s;line-height:1
}
.auth-close:hover {background:var(--bg-tertiary);color:var(--text-primary)}

.auth-tabs {
    display:flex;padding:28px 28px 0;gap:8px
}
.auth-tab {
    flex:1;padding:11px 0;border:none;background:transparent;
    color:var(--text-secondary);font-size:15px;font-weight:600;
    cursor:pointer;border-radius:var(--radius-sm);font-family:inherit;
    transition:all 0.25s
}
.auth-tab.active {
    background:var(--bg-tertiary);color:var(--text-primary)
}
.auth-tab:not(.active):hover {color:var(--text-primary)}

.auth-panel {padding:24px 28px 28px}

.auth-form {margin-bottom:8px}

.auth-field {margin-bottom:18px}
.auth-field label {
    display:block;font-size:13px;font-weight:600;color:var(--text-secondary);margin-bottom:8px;
    letter-spacing:0.15px
}
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    width:100%;padding:12px 16px;
    background:var(--bg-secondary);border:1.5px solid var(--border-medium);
    border-radius:var(--radius-sm);color:var(--text-primary);
    font-size:14px;font-family:inherit;outline:none;
    transition:all 0.22s;box-sizing:border-box
}
.auth-field input::placeholder {color:var(--text-tertiary)}
.auth-field input:focus {
    border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(17,17,17,0.08)
}

.auth-input-group {
    display:flex;gap:10px;align-items:center
}
.auth-input-group input {flex:1}
.code-btn {
    flex-shrink:0;padding:11px 16px;
    background:var(--bg-tertiary);border:1px solid var(--border-light);
    border-radius:var(--radius-sm);color:var(--text-secondary);
    font-size:12px;font-weight:600;cursor:pointer;
    font-family:inherit;white-space:nowrap;transition:all 0.22s
}
.code-btn:hover:not(:disabled) {
    border-color:var(--border-medium);color:var(--text-primary);
    background:#ebebeb
}
.code-btn:disabled {opacity:0.45;cursor:not-allowed}

.auth-submit {
    width:100%;padding:14px 20px;margin-top:6px;
    background:var(--accent);
    border:none;border-radius:var(--radius-md);
    color:white;font-size:14px;font-weight:650;
    cursor:pointer;font-family:inherit;letter-spacing:0.2px;
    transition:all 0.2s;box-shadow:0 2px 10px rgba(17,17,17,0.2)
}
.auth-submit:hover:not(:disabled) {
    background:var(--accent-hover);
    transform:translateY(-1px);box-shadow:var(--shadow-md)
}
.auth-submit:active:not(:disabled) {transform:scale(0.97)}
.auth-submit:disabled {opacity:0.35;cursor:not-allowed;box-shadow:none}

.auth-spinner {
    display:inline-block;width:16px;height:16px;
    border:2px solid rgba(255,255,255,0.3);
    border-top-color:white;border-radius:50%;
    animation:spin 0.7s linear infinite;vertical-align:middle;margin-right:6px
}

.auth-divider {
    display:flex;align-items:center;margin:20px 0;
    color:var(--text-tertiary);font-size:12px
}
.auth-divider::before,.auth-divider::after {
    content:'';flex:1;height:1px;background:var(--border-light)
}
.auth-divider span {padding:0 14px}

.auth-social {display:flex;flex-direction:column;gap:10px}

.auth-wechat-btn {
    display:flex;align-items:center;justify-content:center;gap:9px;
    padding:13px 20px;background:#07C160;border:none;
    border-radius:var(--radius-md);color:white;
    font-size:14px;font-weight:600;cursor:pointer;
    font-family:inherit;transition:all 0.2s
}
.auth-wechat-btn:hover {
    background:#06ad54;transform:translateY(-1px);
    box-shadow:0 4px 16px rgba(7,193,96,0.25)
}

.wechat-hint {
    text-align:center;color:var(--text-secondary);font-size:14px;
    margin-bottom:20px;font-weight:500
}

.qr-container {
    display:flex;justify-content:center;align-items:center;
    min-height:200px;background:var(--bg-tertiary);
    border:1.5px solid var(--border-light);border-radius:var(--radius-md);
    padding:24px;margin-bottom:16px
}
.qr-placeholder {
    display:flex;flex-direction:column;align-items:center;
    gap:12px;color:var(--text-tertiary);font-size:13px
}
#qrImage {border-radius:var(--radius-sm)}

.auth-link-btn {
    display:block;width:100%;padding:12px;
    background:none;border:1px solid var(--border-light);
    border-radius:var(--radius-sm);color:var(--text-secondary);
    font-size:13px;font-weight:500;cursor:pointer;
    font-family:inherit;text-align:center;transition:all 0.18s
}
.auth-link-btn:hover {
    border-color:var(--border-medium);color:var(--text-primary);
    background:var(--bg-tertiary)
}

.auth-logout-btn {
    display:block;margin-top:6px;padding:4px 10px;
    background:none;border:1px solid var(--border-light);
    border-radius:6px;color:var(--text-tertiary);font-size:11px;
    cursor:pointer;font-family:inherit;transition:all 0.15s
}
.auth-logout-btn:hover {background:var(--bg-tertiary);color:#ef4444;border-color:#ef4444}

@media (max-width:480px) {
    .auth-modal {width:94vw;border-radius:var(--radius-lg)}
    .auth-tabs {padding:20px 20px 0}
    .auth-panel {padding:20px 20px 24px}
}
