:root {
    --bg-primary: #FCFBF8;
    --bg-nav: rgba(255, 255, 255, 0.96);
    --bg-input: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFFAF5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-placeholder: #BBBBBB;
    --accent: #FFDAB9;
    --accent-hover: #FFCBA4;
    --accent-deep: #FFA07A;
    --accent-light: #FFF5EE;
    --border: #EEEEEE;
    --border-light: #F0F0F0;
    --success: #52C41A;
    --success-bg: #F6FFED;
    --success-border: #B7EB8F;
    --danger: #FF4D4F;
    --danger-bg: #FFF2F0;
    --danger-border: #FFCCC7;
    --warning: #FA8C16;
    --warning-bg: #FFF7E6;
    --warning-border: #FFD591;
    --info: #1890FF;
    --info-bg: #E6F7FF;
    --info-border: #91D5FF;
    --font-heading: 'ZCOOL KuaiLe', 'Ma Shan Zheng', 'Zhi Mang Xing', cursive, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 40px;
    --nav-height: 70px;
    --bottom-nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-deep);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.25s ease;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: currentColor;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

/* 导航栏 */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    padding: 0 40px;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-primary);
    letter-spacing: 2px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-xl);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--accent-light);
    border-color: var(--accent);
}

/* 主容器 */
.main-container {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 28px) 20px calc(var(--bottom-nav-height) + 28px);
    min-height: 100vh;
}

.main-container.wide {
    max-width: 1100px;
}

/* 底部导航（移动端） */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--bottom-nav-height);
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: none;
    align-items: center;
    justify-content: space-around;
    padding: 0 12px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    min-width: 64px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--text-primary);
    background: var(--accent-light);
    border-color: var(--accent);
}

.bottom-nav-item .icon {
    width: 22px;
    height: 22px;
}

/* 页面切换 */
.page {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.page.active {
    display: block;
}

/* 标题 */
.page-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 胶囊按钮 */
.glass-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-xl);
    transition: all 0.25s ease;
}

.glass-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.glass-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.glass-btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

.glass-btn-outline:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--text-primary);
}

.glass-btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.glass-btn-block {
    width: 100%;
}

/* 注册协议复选框 */
.agree-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 18px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.agree-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--accent-deep);
    cursor: pointer;
}

.agree-box a {
    color: var(--accent-deep);
    text-decoration: none;
    font-weight: 500;
}

.agree-box a:hover {
    text-decoration: underline;
    color: #FF8A65;
}

.glass-btn-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger);
}

.glass-btn-danger:hover {
    background: #FFE5E5;
    border-color: var(--danger);
}

/* 卡片 */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.25s ease;
}

.glass-card:hover {
    border-color: var(--accent);
}

.glass-card-lg {
    border-radius: var(--radius-lg);
    padding: 32px;
}

/* 输入框 */
.glass-input {
    width: 100%;
    padding: 12px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.glass-input::placeholder {
    color: var(--text-placeholder);
}

.glass-input:focus {
    border-color: var(--accent-deep);
    background: var(--accent-light);
}

textarea.glass-input {
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 100px;
}

.glass-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 42px;
}

/* 搜索框 */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar .glass-input {
    padding-left: 46px;
}

/* 拖拽上传区 */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 52px 24px;
    background: var(--bg-input);
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    margin-bottom: 16px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-deep);
    background: var(--accent-light);
}

.drop-zone .icon {
    width: 48px;
    height: 48px;
    color: var(--accent-deep);
    margin-bottom: 12px;
}

.drop-zone h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 文件胶囊列表 */
.file-capsule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-capsule {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.25s ease;
}

.file-capsule:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.file-capsule-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-deep);
    flex-shrink: 0;
}

.file-capsule-icon .icon {
    width: 22px;
    height: 22px;
}

.file-capsule-info {
    flex: 1;
    min-width: 0;
}

.file-capsule-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.file-capsule-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.file-capsule-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-deep);
    background: var(--accent-light);
    border-radius: var(--radius-xl);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.file-capsule-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius-xl);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.file-capsule-detail-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* 格式提示弹窗 */
.modal-sm { max-width: 400px; }

.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.format-tag {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    letter-spacing: 0.5px;
}

.format-tag-image {
    color: var(--accent-deep);
    background: var(--accent-light);
    border-color: var(--accent);
}

.format-hint-text {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.format-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
}

.format-checkbox input[type="checkbox"] {
    accent-color: var(--accent-deep);
    width: 16px;
    height: 16px;
}

.qq-group-notice {
    margin: 16px 0;
    padding: 14px 16px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 12px;
    text-align: center;
}

.qq-group-notice p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 12px;
    line-height: 1.5;
}

.qq-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 8px 24px;
    text-decoration: none;
}

/* 文件格式提示（旧版，保留兼容） */
.file-format-hint {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 10px 0 4px;
    letter-spacing: 0.3px;
}

/* ============================================================
   在线代码编辑器（ACE 编辑器 + 洛苏风格）
   ============================================================ */

.modal-editor {
    max-width: 880px;
    width: 92vw;
    min-height: 42vh;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    gap: 10px;
    flex-shrink: 0;
}

.editor-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-file-type {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-deep);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--accent);
    white-space: nowrap;
}

.editor-status {
    font-size: 0.72rem;
    color: var(--success);
    padding: 2px 10px;
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius-xl);
    white-space: nowrap;
}

.editor-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ACE 编辑器容器 */
.editor-ace-container {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
}

.editor-ace-container .ace_gutter {
    background: #FAFAFA !important;
    border-right: 1px solid var(--border) !important;
}

.editor-ace-container .ace_gutter-cell {
    color: var(--text-placeholder) !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    padding: 0 8px !important;
}

.editor-ace-container .ace_scroller {
    background: var(--bg-card) !important;
}

.editor-ace-container .ace_cursor {
    color: var(--text-primary) !important;
}

.editor-ace-container .ace_active-line {
    background: #FFF5EE !important;
}

.editor-ace-container .ace_print-margin {
    display: none;
}

/* 隐藏多余元素（旧 textarea 行号列） */
.editor-line-numbers {
    display: none;
}

/* 平板端 */
@media (max-width: 768px) {
    .modal-editor {
        width: 98vw;
        max-height: 76vh;
        min-height: 40vh;
    }
    .editor-toolbar {
        padding: 10px 16px;
    }
    .editor-file-type {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    .editor-ace-container .ace_gutter-cell {
        font-size: 10px !important;
        padding: 0 6px !important;
    }
}

/* 手机端 */
@media (max-width: 520px) {
    .modal-overlay {
        padding: 8px;
    }
    .modal-editor {
        width: 100vw;
        max-width: 100vw;
        min-height: 75vh;
        max-height: 96vh;
        border-radius: 0;
        overflow: hidden;
    }
    .editor-toolbar {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .editor-toolbar .glass-btn-sm {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    .editor-file-type {
        font-size: 0.72rem;
        padding: 2px 8px;
    }
    .editor-status {
        font-size: 0.68rem;
        padding: 1px 8px;
    }
    .editor-ace-container .ace_gutter {
        width: 32px !important;
    }
    .editor-ace-container .ace_gutter-cell {
        font-size: 9px !important;
        padding: 0 4px !important;
    }
}

.file-capsule-detail-btn .icon {
    width: 16px;
    height: 16px;
}

@media (max-width: 480px) {
    .file-capsule {
        padding: 10px 12px;
        gap: 10px;
    }

    .file-capsule-detail-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .file-capsule-detail-btn .icon {
        width: 14px;
        height: 14px;
    }
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 24px 16px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.stat-card:hover {
    border-color: var(--accent);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-deep);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* 表格 */
.glass-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.glass-table th {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
}

.glass-table td {
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid #FAFAFA;
    padding: 12px 10px;
}

.glass-table tr:hover td {
    background: var(--bg-card-hover);
}

/* 标签/徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    border: 1px solid;
    font-weight: 500;
}

.badge-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}

.badge-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 200px;
}

.toast.success {
    border-color: var(--success-border);
    color: var(--success);
}

.toast.error {
    border-color: var(--danger-border);
    color: var(--danger);
}

.toast.warning {
    border-color: var(--warning-border);
    color: var(--warning);
}

.toast.info {
    border-color: var(--info-border);
    color: var(--info);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--border);
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.modal-close:hover {
    background: var(--accent-light);
    color: var(--text-primary);
    border-color: var(--accent);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

.modal-footer .glass-btn {
    flex: 0 0 auto;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* 验证码行：输入框 + 右侧按钮 */
.code-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.code-input {
    flex: 1;
}

.code-send-btn {
    flex-shrink: 0;
    min-width: 100px;
    height: 46px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    background: var(--accent-deep);
    border: 1px solid var(--accent-deep);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.code-send-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.code-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: var(--text-secondary);
    background: var(--bg-input);
    border-color: var(--border);
}

/* 详情弹窗内URL行 */
.detail-url-row-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.detail-url-row-inline .detail-url-input {
    flex: 1;
    font-size: 0.8rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
}

.detail-url-row-inline .glass-btn {
    flex-shrink: 0;
}

/* 个人中心 */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-deep);
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar .icon {
    width: 36px;
    height: 36px;
}

.profile-info h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-xl);
    transition: width 0.4s ease;
}

/* 功能入口网格 */
.function-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.function-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.function-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.function-card .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-deep);
    margin-bottom: 12px;
}

.function-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.function-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== VIP / 会员中心 - 全新豪华版 v2 ========== */
/* --- 会员徽章 --- */
.vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, #FFD700 0%, #FF6B35 100%);
    border-radius: var(--radius-xl);
    vertical-align: middle;
    margin-left: 6px;
}

.member-expire {
    font-size: 0.8rem;
    color: var(--accent-deep);
    margin-top: 4px;
}

.member-benefits {
    background: linear-gradient(135deg, #FFFAF5 0%, #FFF5EE 100%);
    border: 1px solid rgba(255, 180, 100, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.member-benefits h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.benefit-item .icon {
    width: 18px;
    height: 18px;
    color: var(--accent-deep);
    fill: var(--accent-deep);
    stroke: var(--accent-deep);
    flex-shrink: 0;
}

/* ==================== VIP会员中心 - 全新豪华版 v2 ==================== */

/* --- 容器与粒子 --- */
.vip-container { padding: 0 16px; }
.vip-particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.vip-particle { position: absolute; border-radius: 50%; background: rgba(255, 215, 0, 0.5); animation: vipFloat ease-in-out infinite alternate; }
@keyframes vipFloat { 0% { transform: translateY(0) scale(1); opacity: 0.3; } 100% { transform: translateY(-20px) scale(1.5); opacity: 0; } }
@keyframes vipPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes vipSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vipShine { 0% { transform: translateX(-100%) rotate(25deg); } 100% { transform: translateX(200%) rotate(25deg); } }
@keyframes vipOrb1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -20px) scale(1.1); } }
@keyframes vipOrb2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-20px, 30px) scale(1.15); } }
@keyframes vipOrb3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(20px, 20px) scale(0.9); } }

/* --- 头部 --- */
.vip-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; position: relative; z-index: 1; }
.vip-header-title { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); margin: 0; font-family: var(--font-heading); letter-spacing: 0.5px; }

/* --- VIP状态条 --- */
.vip-status-bar { margin-bottom: 16px; position: relative; z-index: 1; animation: vipSlideUp 0.5s ease; }
.vip-status-bar-inner { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #1a1a2e 0%, #2d1b3e 50%, #0f3460 100%); border-radius: var(--radius-lg); padding: 16px 20px; border: 1px solid rgba(255, 215, 0, 0.2); }
.vip-status-bar-icon { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #FFD700, #FFA500); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
.vip-status-bar-icon svg { width: 24px; height: 24px; fill: #fff; }
.vip-status-bar-info { display: flex; flex-direction: column; gap: 3px; }
.vip-status-bar-title { font-size: 1.05rem; font-weight: 700; color: #FFD700; font-family: var(--font-heading); }
.vip-status-bar-expire { font-size: 0.78rem; color: rgba(255,255,255,0.7); }
.vip-status-bar-expire em { font-style: normal; color: #FFD700; font-weight: 600; }

/* --- Hero 区域 --- */
.vip-hero-new { position: relative; overflow: hidden; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%); border-radius: var(--radius-xl); margin-bottom: 24px; z-index: 1; }
.vip-hero-bg { position: absolute; inset: 0; overflow: hidden; }
.vip-hero-orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.3; }
.vip-hero-orb-1 { width: 180px; height: 180px; background: radial-gradient(circle, #FFD700, transparent); top: -40px; left: -60px; animation: vipOrb1 8s ease-in-out infinite; }
.vip-hero-orb-2 { width: 140px; height: 140px; background: radial-gradient(circle, #A855F7, transparent); top: 50%; right: -30px; animation: vipOrb2 10s ease-in-out infinite; }
.vip-hero-orb-3 { width: 120px; height: 120px; background: radial-gradient(circle, #F472B6, transparent); bottom: -30px; left: 30%; animation: vipOrb3 7s ease-in-out infinite; }
.vip-hero-content { position: relative; z-index: 1; padding: 36px 24px 32px; text-align: center; }
.vip-hero-crown-wrap { margin-bottom: 16px; display: flex; justify-content: center; }
.vip-hero-crown-icon { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #FFD700, #FFA500); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(255, 215, 0, 0.4); animation: vipPulse 2s ease-in-out infinite; }
.vip-hero-crown-icon svg { width: 34px; height: 34px; fill: #fff; }
.vip-hero-title-new { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0 0 10px; font-family: var(--font-heading); letter-spacing: 1px; }
.vip-hero-highlight { background: linear-gradient(135deg, #FFD700, #FFA500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.vip-hero-desc { font-size: 0.82rem; color: rgba(255,255,255,0.65); margin: 0; line-height: 1.6; }

/* --- 通用 Section Header --- */
.vip-section-header { text-align: center; margin-bottom: 18px; position: relative; z-index: 1; }
.vip-section-heading { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; font-family: var(--font-heading); }
.vip-section-sub { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* --- 套餐卡片 Grid --- */
.vip-plans-wrap { margin-bottom: 24px; position: relative; z-index: 1; }
.vip-plans-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.vip-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; color: var(--text-muted); font-size: 0.85rem; }
.vip-loading-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.vip-empty { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 0.85rem; }

/* --- 套餐卡片 --- */
.vip-plan-card { position: relative; background: #fff; border-radius: var(--radius-xl); padding: 24px 18px 20px; text-align: center; border: 1.5px solid var(--border); cursor: pointer; transition: all 0.3s ease; overflow: hidden; }
.vip-plan-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.vip-plan-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; transition: all 0.3s ease; }
.vip-plan-silver::before { background: linear-gradient(90deg, #C0C0C0, #A8A8A8); }
.vip-plan-gold::before { background: linear-gradient(90deg, #FFD700, #FFA500); }
.vip-plan-platinum::before { background: linear-gradient(90deg, #E8D5B7, #A855F7); }
.vip-plan-popular { border-color: #FFD700; box-shadow: 0 4px 24px rgba(255, 215, 0, 0.15); }
.vip-plan-popular:hover { box-shadow: 0 12px 36px rgba(255, 215, 0, 0.25); }
.vip-plan-badge { position: absolute; top: 12px; right: 12px; background: linear-gradient(135deg, #FF6347, #FF4500); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-xl); letter-spacing: 0.5px; }
.vip-plan-tag { position: absolute; top: 12px; left: 12px; font-size: 0.65rem; font-weight: 600; padding: 2px 10px; border-radius: var(--radius-xl); color: #fff; letter-spacing: 0.5px; }
.vip-tag-silver { background: linear-gradient(135deg, #A8A8A8, #888); }
.vip-tag-gold { background: linear-gradient(135deg, #FFD700, #FF8C00); }
.vip-tag-platinum { background: linear-gradient(135deg, #A855F7, #7C3AED); }

.vip-plan-icon-wrap { margin-bottom: 14px; display: flex; justify-content: center; }
.vip-plan-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.vip-plan-icon svg { width: 26px; height: 26px; fill: #fff; }
.vip-icon-silver { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); }
.vip-icon-gold { background: linear-gradient(135deg, #FFD700, #FFA500); box-shadow: 0 0 16px rgba(255, 215, 0, 0.3); }
.vip-icon-platinum { background: linear-gradient(135deg, #A855F7, #7C3AED); box-shadow: 0 0 16px rgba(168, 85, 247, 0.3); }

.vip-plan-name { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; font-family: var(--font-heading); }
.vip-plan-price { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin-bottom: 2px; }
.vip-plan-symbol { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.vip-plan-amount { font-size: 2.2rem; font-weight: 800; color: var(--text-primary); font-family: var(--font-heading); line-height: 1; }
.vip-plan-period { font-size: 0.75rem; color: var(--text-muted); margin: 0 0 16px; }

.vip-plan-features { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; text-align: left; }
.vip-plan-feat { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); }
.vip-feat-check { width: 16px; height: 16px; flex-shrink: 0; fill: #22C55E; }
.vip-plan-feat b { font-weight: 600; color: var(--text-primary); }

.vip-plan-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px 0; border: none; border-radius: var(--radius-xl); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; color: #fff; font-family: inherit; letter-spacing: 0.5px; }
.vip-plan-btn:hover { transform: translateY(-2px); }
.vip-btn-silver { background: linear-gradient(135deg, #A8A8A8, #888); }
.vip-btn-silver:hover { box-shadow: 0 4px 14px rgba(136, 136, 136, 0.4); }
.vip-btn-gold { background: linear-gradient(135deg, #FFD700, #FF8C00); }
.vip-btn-gold:hover { box-shadow: 0 4px 14px rgba(255, 140, 0, 0.4); }
.vip-btn-platinum { background: linear-gradient(135deg, #A855F7, #7C3AED); }
.vip-btn-platinum:hover { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4); }
.vip-btn-arrow { width: 16px; height: 16px; fill: currentColor; transition: transform 0.3s ease; }
.vip-plan-btn:hover .vip-btn-arrow { transform: translateX(3px); }

/* --- 会员权益 --- */
.vip-benefits-wrap { margin-bottom: 24px; position: relative; z-index: 1; }
.vip-benefits-grid-new { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vip-benefit-item-new { background: #fff; border-radius: var(--radius-lg); padding: 16px 14px; border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; transition: all 0.3s ease; }
.vip-benefit-item-new:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.vip-benefit-icon-new { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vip-benefit-icon-new svg { width: 22px; height: 22px; fill: #fff; }
.vip-benefit-gold { background: linear-gradient(135deg, #FFD700, #FFA500); }
.vip-benefit-purple { background: linear-gradient(135deg, #A855F7, #7C3AED); }
.vip-benefit-pink { background: linear-gradient(135deg, #F472B6, #EC4899); }
.vip-benefit-blue { background: linear-gradient(135deg, #60A5FA, #3B82F6); }
.vip-benefit-info-new h3 { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin: 0 0 3px; }
.vip-benefit-info-new p { font-size: 0.7rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

/* --- 兑换码区域 --- */
.vip-redeem-wrap { margin-bottom: 24px; position: relative; z-index: 1; }
.vip-redeem-card-new { background: #fff; border-radius: var(--radius-xl); padding: 20px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.vip-redeem-card-left { display: flex; align-items: center; gap: 12px; }
.vip-redeem-icon-wrap { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #FEF3C7, #FDE68A); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vip-redeem-icon-wrap svg { width: 22px; height: 22px; fill: #D97706; }
.vip-redeem-text h3 { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin: 0 0 2px; }
.vip-redeem-text p { font-size: 0.75rem; color: var(--text-muted); margin: 0; }
.vip-redeem-form-new { width: 100%; }
.vip-redeem-input-wrap { display: flex; gap: 8px; }
.vip-redeem-input-new { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); font-size: 0.85rem; font-family: inherit; outline: none; transition: border-color 0.3s ease; background: var(--bg-input); color: var(--text-primary); }
.vip-redeem-input-new:focus { border-color: var(--accent); }
.vip-redeem-input-new::placeholder { color: #C0C0C0; }
.vip-redeem-btn-new { display: inline-flex; align-items: center; gap: 5px; padding: 10px 18px; background: linear-gradient(135deg, #FFD700, #FF8C00); color: #fff; border: none; border-radius: var(--radius-lg); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; font-family: inherit; }
.vip-redeem-btn-new:hover { box-shadow: 0 4px 14px rgba(255, 140, 0, 0.35); transform: translateY(-1px); }
.vip-redeem-btn-new svg { width: 16px; height: 16px; fill: currentColor; }
.vip-redeem-btn-new:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.vip-buy-link-new { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-deep); font-size: 0.82rem; font-weight: 500; text-decoration: none; transition: all 0.3s ease; }
.vip-buy-link-new:hover { color: #FF8C00; }
.vip-buy-link-new svg { width: 16px; height: 16px; fill: currentColor; }
.vip-buy-link-arrow { width: 14px; height: 14px; }

/* --- 底部 --- */
.vip-footer-section { margin: 4px 0 20px; text-align: center; position: relative; z-index: 1; }
.vip-footer-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,215,0,0.15), transparent); margin-bottom: 8px; }
.vip-footer-text { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; color: #CCC; letter-spacing: 1px; }
.vip-footer-text .icon { width: 13px; height: 13px; opacity: 0.4; }

/* --- 按钮spinner --- */
.vip-btn-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }

/* ==================== 套餐详情面板 ==================== */
.vip-plan-detail { animation: vipSlideUp 0.35s ease; }
.vip-detail-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 8px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.25s ease; font-family: inherit; }
.vip-detail-back:hover { border-color: var(--accent); background: var(--accent-light); color: var(--text-primary); }
.vip-detail-back .icon { width: 16px; height: 16px; transform: rotate(180deg); }

.vip-detail-card { background: #fff; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.06); }
.vip-detail-hero { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%); padding: 28px 20px 24px; text-align: center; color: #fff; }
.vip-detail-crown { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #FFD700, #FFA500); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; box-shadow: 0 0 24px rgba(255, 215, 0, 0.3); }
.vip-detail-crown .icon { width: 28px; height: 28px; fill: #fff; }
.vip-detail-name { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; font-family: var(--font-heading); }
.vip-detail-price-row { display: flex; align-items: baseline; justify-content: center; gap: 3px; margin-bottom: 4px; }
.vip-detail-currency { font-size: 1.2rem; font-weight: 500; color: #FFD700; }
.vip-detail-amount { font-size: 2.4rem; font-weight: 800; color: #FFD700; font-family: var(--font-heading); line-height: 1; }
.vip-detail-meta { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin: 0; }
.vip-detail-meta span { color: #FFD700; font-weight: 600; }

.vip-detail-body { padding: 16px 20px; }
.vip-detail-body-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin: 0 0 12px; }
.vip-detail-items { display: flex; flex-direction: column; gap: 8px; }
.vip-detail-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-input); border-radius: var(--radius-md); }
.vip-detail-item-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vip-detail-item-icon .icon { width: 18px; height: 18px; fill: #fff; }
.vip-detail-icon-cloud { background: linear-gradient(135deg, #FFD700, #FFA500); }
.vip-detail-icon-file { background: linear-gradient(135deg, #A855F7, #7C3AED); }
.vip-detail-icon-crown { background: linear-gradient(135deg, #F472B6, #EC4899); }
.vip-detail-icon-support { background: linear-gradient(135deg, #60A5FA, #3B82F6); }
.vip-detail-item-info { display: flex; flex-direction: column; gap: 2px; }
.vip-detail-item-info strong { font-size: 0.8rem; color: var(--text-primary); }
.vip-detail-item-info span { font-size: 0.72rem; color: var(--text-muted); }
.vip-detail-item-info em { font-style: normal; color: #FF8C00; font-weight: 600; }

.vip-detail-actions { padding: 0 20px 4px; text-align: center; }
.vip-detail-buy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px 0; background: linear-gradient(135deg, #FF6347, #FF4500); color: #fff; font-size: 1rem; font-weight: 600; border-radius: var(--radius-xl); text-decoration: none; transition: all 0.3s ease; box-shadow: 0 4px 14px rgba(255,69,0,0.25); letter-spacing: 1px; }
.vip-detail-buy-btn:hover { background: linear-gradient(135deg, #FF7F50, #FF6347); box-shadow: 0 6px 20px rgba(255,69,0,0.35); transform: translateY(-2px); }
.vip-detail-hint { margin-top: 10px; font-size: 0.75rem; color: #BBB; }

.vip-detail-redeem { padding: 16px 20px 20px; }
.vip-detail-redeem-divider { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.vip-detail-redeem-divider::before,
.vip-detail-redeem-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.06), transparent); }
.vip-detail-redeem-divider span { font-size: 0.78rem; color: #AAA; white-space: nowrap; }

/* --- 旧版兑换码/etail 兼容 --- */
.vip-redeem-input-row { display: flex; gap: 8px; }
.vip-redeem-input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); font-size: 0.85rem; font-family: inherit; outline: none; transition: border-color 0.3s ease; background: var(--bg-input); color: var(--text-primary); }
.vip-redeem-input:focus { border-color: var(--accent); }
.vip-redeem-input::placeholder { color: #C0C0C0; }
.vip-redeem-btn { display: inline-flex; align-items: center; gap: 5px; padding: 10px 18px; background: linear-gradient(135deg, #FFD700, #FF8C00); color: #fff; border: none; border-radius: var(--radius-lg); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; font-family: inherit; }
.vip-redeem-btn:hover { box-shadow: 0 4px 14px rgba(255, 140, 0, 0.35); transform: translateY(-1px); }
.vip-redeem-btn:active { transform: scale(0.97); }
.vip-redeem-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ==================== 响应式 ==================== */

/* --- 平板 ≥640px --- */
@media (min-width: 640px) {
    .vip-plans-grid { grid-template-columns: repeat(3, 1fr); }
    .vip-benefits-grid-new { grid-template-columns: repeat(4, 1fr); }
    .vip-redeem-card-new { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
    .vip-redeem-form-new { width: auto; }
    .vip-redeem-input-wrap { width: 280px; }
    .vip-hero-title-new { font-size: 1.7rem; }
    .vip-hero-content { padding: 44px 32px 40px; }
}

/* --- 平板 ≥768px --- */
@media (min-width: 768px) {
    .vip-container { padding: 0 24px; }
    .vip-header { margin-bottom: 20px; }
    .vip-header-title { font-size: 1.5rem; }
    .vip-hero-title-new { font-size: 1.8rem; }
    .vip-hero-content { padding: 48px 36px 44px; }
    .vip-hero-crown-icon { width: 72px; height: 72px; }
    .vip-hero-crown-icon svg { width: 38px; height: 38px; }
    .vip-plans-grid { gap: 16px; }
    .vip-plan-card { padding: 26px 20px 22px; }
    .vip-plan-name { font-size: 1.1rem; }
    .vip-plan-amount { font-size: 2.4rem; }
    .vip-benefits-grid-new { gap: 12px; }
    .vip-benefit-item-new { padding: 18px 14px; }
    .vip-benefit-icon-new { width: 44px; height: 44px; }
    .vip-benefit-icon-new svg { width: 24px; height: 24px; }
    .vip-benefit-info-new h3 { font-size: 0.85rem; }
    .vip-benefit-info-new p { font-size: 0.74rem; }
    .vip-section-heading { font-size: 1.25rem; }
    .vip-detail-hero { padding: 32px 28px 26px; }
    .vip-detail-crown { width: 60px; height: 60px; }
    .vip-detail-crown .icon { width: 32px; height: 32px; }
    .vip-detail-name { font-size: 1.4rem; }
    .vip-detail-amount { font-size: 2.8rem; }
    .vip-detail-body { padding: 20px 24px; }
    .vip-detail-actions { padding: 0 24px 4px; }
    .vip-detail-redeem { padding: 16px 24px 20px; }
    .vip-footer-section { margin: 8px 0 28px; }
}

/* --- 桌面端 ≥1024px --- */
@media (min-width: 1024px) {
    .vip-container { padding: 0 28px; }
    .vip-hero-content { padding: 56px 40px 52px; }
    .vip-hero-title-new { font-size: 2rem; }
    .vip-hero-crown-icon { width: 80px; height: 80px; }
    .vip-hero-crown-icon svg { width: 42px; height: 42px; }
    .vip-plans-grid { gap: 20px; }
    .vip-plan-card { padding: 28px 22px 24px; }
    .vip-plan-name { font-size: 1.15rem; }
    .vip-plan-amount { font-size: 2.6rem; }
    .vip-benefits-grid-new { gap: 14px; }
    .vip-plan-detail { max-width: 640px; margin: 0 auto; }
}

/* --- 宽屏 ≥1200px --- */
@media (min-width: 1200px) {
    .vip-container { padding: 0 32px; max-width: 960px; margin: 0 auto; }
    .vip-hero-content { padding: 60px 48px 56px; }
    .vip-plans-grid { gap: 24px; }
    .vip-plan-card { padding: 30px 24px 26px; }
    .vip-plan-amount { font-size: 2.8rem; }
    .vip-benefits-grid-new { gap: 16px; }
    .vip-benefit-item-new { padding: 20px 16px; }
    .vip-detail-hero { padding: 36px 32px 30px; }
    .vip-detail-body { padding: 20px 28px; }
    .vip-detail-actions { padding: 0 28px 4px; }
    .vip-detail-redeem { padding: 16px 28px 24px; }
}

/* --- 小屏手机 ≤380px --- */
@media (max-width: 380px) {
    .vip-container { padding: 0 10px; }
    .vip-hero-content { padding: 24px 14px 20px; }
    .vip-hero-crown-icon { width: 48px; height: 48px; }
    .vip-hero-crown-icon svg { width: 26px; height: 26px; }
    .vip-hero-title-new { font-size: 1.15rem; }
    .vip-hero-desc { font-size: 0.7rem; }
    .vip-plans-grid { gap: 10px; }
    .vip-plan-card { padding: 16px 12px; }
    .vip-plan-name { font-size: 0.9rem; }
    .vip-plan-amount { font-size: 1.6rem; }
    .vip-benefits-grid-new { gap: 6px; }
    .vip-benefit-item-new { padding: 10px 8px; }
    .vip-benefit-icon-new { width: 32px; height: 32px; }
    .vip-benefit-icon-new svg { width: 16px; height: 16px; }
    .vip-benefit-info-new h3 { font-size: 0.7rem; }
    .vip-benefit-info-new p { font-size: 0.62rem; }
    .vip-redeem-input-wrap { flex-direction: column; }
    .vip-redeem-btn-new { justify-content: center; }
    .vip-redeem-input-row { flex-direction: column; }
    .vip-redeem-btn { justify-content: center; }
    .vip-detail-hero { padding: 20px 14px 16px; }
    .vip-detail-crown { width: 44px; height: 44px; }
    .vip-detail-crown .icon { width: 24px; height: 24px; }
    .vip-detail-name { font-size: 1.1rem; }
    .vip-detail-amount { font-size: 2rem; }
    .vip-detail-body { padding: 12px 14px; }
    .vip-detail-item { padding: 8px 10px; gap: 10px; }
    .vip-detail-item-icon { width: 32px; height: 32px; }
    .vip-detail-item-icon .icon { width: 16px; height: 16px; }
    .vip-detail-actions { padding: 0 14px 4px; }
    .vip-detail-redeem { padding: 12px 14px 16px; }
    .vip-detail-buy-btn { font-size: 0.9rem; padding: 12px 0; }
}
/* 分析工具 */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.25s ease;
}

.tool-card:hover {
    border-color: var(--accent);
}

.chart-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding: 20px 0;
    margin-top: 16px;
}

.chart-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.chart-bar-fill {
    width: 100%;
    background: var(--accent);
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
    min-height: 8px;
    transition: height 0.4s ease;
}

.chart-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .glass-nav {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .main-container {
        padding-top: 20px;
        padding-bottom: calc(var(--bottom-nav-height) + 20px);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .function-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .file-capsule {
        padding: 10px 14px;
    }

    .file-capsule-name {
        font-size: 0.85rem;
    }

    .glass-card {
        padding: 18px;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .function-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-deep { color: var(--accent-deep); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 12px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ==================== 空间兑换卡片 ==================== */
.store-exchange-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 10px;
}
.store-exchange-card:hover {
    border-color: var(--accent-deep);
    box-shadow: 0 4px 16px rgba(255,160,122,0.12);
    transform: translateY(-1px);
}
.store-exchange-card:last-child { margin-bottom: 0; }
.store-card-highlight {
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFFDF5, #FFF8E1);
    box-shadow: 0 2px 12px rgba(255,215,0,0.1);
}
.store-card-highlight:hover {
    box-shadow: 0 6px 20px rgba(255,215,0,0.2);
}
.store-card-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: linear-gradient(135deg, #FF6347, #FF4500);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    letter-spacing: 0.5px;
}
.store-exchange-card { position: relative; }
.store-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #E0F2FE, #BAE6FD);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.store-card-icon svg {
    width: 24px;
    height: 24px;
    fill: #0284C7;
}
.store-card-info {
    flex: 1;
    min-width: 0;
}
.store-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}
.store-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin: 0;
}
.store-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.store-card-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-deep);
}
.store-card-price .icon {
    width: 16px;
    height: 16px;
    fill: var(--accent-deep);
}
.store-card-btn {
    padding: 6px 18px;
    background: linear-gradient(135deg, #FFA07A, #FF8A65);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    white-space: nowrap;
}
.store-card-btn:hover {
    background: linear-gradient(135deg, #FF8A65, #FF7043);
    box-shadow: 0 3px 10px rgba(255,138,101,0.3);
    transform: scale(1.04);
}
.store-card-btn:active { transform: scale(0.96); }
.store-card-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 380px) {
    .store-exchange-card {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    .store-card-right {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
    .store-card-icon { width: 36px; height: 36px; }
    .store-card-icon svg { width: 20px; height: 20px; }
}

/* ============================================================
   文件详情弹窗 — 图片预览 + 备注（洛苏风格）
   ============================================================ */

.modal-file-detail {
    max-width: 640px;
}

.modal-body-detail {
    display: flex;
    gap: 20px;
    padding: 24px;
}

.detail-preview {
    width: 180px;
    min-height: 180px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: #FAFAFA;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.detail-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-info-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 信息网格 */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 16px;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-info-item.detail-info-full {
    grid-column: 1 / -1;
}

.detail-info-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.detail-info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

/* 备注区 — 洛苏风格 */
.detail-note-section {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 2px;
}

.detail-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.detail-note-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.detail-note-saved {
    font-size: 0.72rem;
    color: var(--success);
    padding: 2px 12px;
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius-xl);
    animation: fadeInOut 2s ease;
}

.detail-note-textarea {
    width: 100%;
    min-height: 60px;
    padding: 14px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: #FAFAFA;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    resize: vertical;
    outline: none;
    transition: all 0.2s;
    line-height: 1.6;
}

.detail-note-textarea:focus {
    border-color: var(--accent-deep);
    background: #FFF5EE;
}

.detail-note-textarea::placeholder {
    color: var(--text-placeholder);
}

.detail-note-save-btn {
    margin-top: 12px;
    display: flex;
    margin-left: auto;
    padding: 8px 28px;
    font-size: 0.82rem;
    background: linear-gradient(135deg, #FFA07A, #FF8A65);
    border: none;
    border-radius: var(--radius-xl);
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-body);
    font-weight: 600;
}

.detail-note-save-btn:hover {
    background: linear-gradient(135deg, #FF8A65, #FF7043);
    box-shadow: 0 3px 10px rgba(255,138,101,0.3);
    transform: scale(1.04);
}

.detail-note-save-btn:active { transform: scale(0.96); }

/* 响应式：小屏上下堆叠 */
@media (max-width: 520px) {
    .modal-file-detail {
        max-width: 100%;
    }
    .modal-body-detail {
        flex-direction: column;
        padding: 18px;
        gap: 16px;
    }
    .detail-preview {
        width: 100%;
        min-height: 140px;
        max-height: 200px;
    }
    .detail-info-grid {
        gap: 10px 12px;
    }
    .detail-note-textarea {
        min-height: 54px;
        padding: 12px 18px;
        font-size: 0.82rem;
        border-radius: var(--radius-xl);
    }
    .detail-note-save-btn {
        padding: 7px 22px;
        font-size: 0.78rem;
    }
}
