/* ===== 念响前端样式（参考移动端卡片 + 柔色渐变风格） ===== */
:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #0f766e 0%, #06b6d4 100%);
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

#app {
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
}

/* Pages */
.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 80px;
}

.page.active {
    display: block;
}

/* Splash */
.splash-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ccfbf1 0%, #e0e7ff 50%, #f3e8ff 100%);
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.splash-page.active {
    display: flex;
}

.splash-content {
    text-align: center;
    padding: 20px;
}

.logo-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #0f766e, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.logo-sub {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 1px;
}

/* Header */
.header-bar {
    background: var(--card);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-bar h1 {
    font-size: 18px;
    font-weight: 600;
}

.back-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    padding: 4px 8px;
}

/* Container */
.container {
    padding: 16px;
}

/* Card */
.card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.form-card {
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.captcha-row {
    display: flex;
    gap: 8px;
}

.captcha-row input {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    width: 100%;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
}

.btn-lg {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    margin-top: 8px;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.fab {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-size: 24px;
    font-weight: 300;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    max-width: 480px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0 16px;
}

.tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

/* Capsule List */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.capsule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.1s;
}

.capsule-item:active {
    transform: scale(0.98);
}

.capsule-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.capsule-info p {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
}

.capsule-type {
    font-size: 11px;
}

/* Badge */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

.badge-pending {
    background: #dbeafe;
    color: #1e40af;
}

.badge-opened {
    background: #d1fae5;
    color: #065f46;
}

.badge-expired {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 14px;
}

/* File upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload:hover {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.02);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-icon {
    font-size: 32px;
    opacity: 0.5;
}

.file-upload p {
    font-size: 14px;
    color: var(--muted);
}

.file-hint {
    font-size: 11px;
    color: #94a3b8;
}

.file-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.file-info {
    font-size: 13px;
    color: var(--text);
}

.select-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    outline: none;
}

/* Detail card */
.detail-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.media-area {
    min-height: 200px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-area img,
.media-area video {
    width: 100%;
    border-radius: 12px;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Profile */
.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.profile-info h3 {
    font-size: 16px;
    font-weight: 600;
}

.profile-phone {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.profile-vip {
    font-size: 12px;
    color: var(--primary);
    margin-top: 2px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    cursor: pointer;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.menu-item:last-child {
    border-bottom: none;
}

.arrow {
    color: var(--muted);
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: none;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--muted);
    cursor: pointer;
    flex: 1;
}

.nav-item .icon {
    font-size: 20px;
}

.nav-item.active {
    color: var(--accent);
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 2000;
    display: none;
    max-width: 480px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

/* Tip card */
.tip-card {
    background: #fffbeb;
    border: 1px solid #fef3c7;
}

.tip-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tip-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* Loading */
.loading {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.muted {
    color: var(--muted);
    font-size: 14px;
}
