/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f2f4f8;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 70px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 容器 ===== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 80px 16px;
}

/* ===== 标题 ===== */
h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #0f172a;
}
h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
}
h3 {
    font-size: 16px;
    font-weight: 600;
}

/* ===== 视频网格 ===== */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.video-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e9edf2;
    text-decoration: none;
    color: #1e293b;
    position: relative;
    transition: transform 0.15s;
}
.video-card:active {
    transform: scale(0.97);
}
.card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #e9ecef;
    overflow: hidden;
}
.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #e9ecef;
    display: block;
}
.free-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #22c55e;
    color: #fff;
    padding: 2px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    z-index: 2;
}
.video-card h3 {
    padding: 10px 8px 12px 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    color: #0f172a;
}

/* ===== 底部导航 ===== */
.bottom-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    display: flex;
    border-top: 1px solid #e9edf2;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999;
    padding: 6px 0 env(safe-area-inset-bottom);
}
.bottom-tab .tab-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.bottom-tab .tab-item .tab-icon {
    font-size: 22px;
    line-height: 1;
}
.bottom-tab .tab-item.active {
    color: #3b82f6;
    font-weight: 600;
}
.bottom-tab .tab-item.active .tab-icon {
    color: #3b82f6;
}

/* ===== 登录/注册页面 ===== */
.auth-page {
    background: linear-gradient(135deg, #e0e7ff 0%, #f0e6ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 36px 28px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.auth-card h2 {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 4px 0;
    color: #1e1b4b;
    letter-spacing: -0.5px;
}
.auth-card .subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 30px;
    font-weight: 400;
}
.auth-card .input-group {
    margin-bottom: 18px;
}
.auth-card .input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.auth-card .input-group .input-wrap {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-card .input-group .input-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}
.auth-card .input-group .input-icon {
    padding: 0 12px 0 16px;
    font-size: 18px;
    color: #9ca3af;
    line-height: 1;
    flex-shrink: 0;
}
.auth-card .input-group input {
    flex: 1;
    padding: 16px 16px 16px 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #1f2937;
    min-width: 0;
}
.auth-card .input-group input::placeholder {
    color: #9ca3af;
}

/* 验证码行（分两行适配） */
.auth-card .captcha-group .captcha-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.auth-card .captcha-group .captcha-display {
    background: #eef2ff;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    color: #4338ca;
    white-space: nowrap;
    border: 1px solid #c7d2fe;
    flex-shrink: 0;
}
.auth-card .captcha-group .input-wrap {
    flex: 1;
    min-width: 150px;
}

/* 按钮 */
.auth-card .btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.auth-card .btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.auth-card .auth-links {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: #6b7280;
}
.auth-card .auth-links a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}
.auth-card .auth-links a:hover {
    text-decoration: underline;
}
.auth-card .msg-box {
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-card .msg-box.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.auth-card .msg-box.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.auth-card .msg-box .msg-icon {
    font-size: 20px;
}

/* 小屏手机验证码换行 */
@media (max-width: 420px) {
    .auth-card .captcha-group .captcha-box {
        flex-direction: column;
        align-items: stretch;
    }
    .auth-card .captcha-group .captcha-display {
        text-align: center;
    }
    .auth-card .captcha-group .input-wrap {
        min-width: unset;
    }
}

/* ===== 个人中心（我的） ===== */
.my-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 80px 16px;
    position: relative;
    z-index: 1;
}
.my-header-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0 0 40px 40px;
    z-index: 0;
}
.profile-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 28px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-top: 20px;
    position: relative;
    z-index: 1;
}
.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}
.avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.status-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 40px;
    background: #fff;
    border: 2px solid #fff;
    white-space: nowrap;
}
.status-badge.active {
    color: #16a34a;
    background: #dcfce7;
}
.status-badge.inactive {
    color: #dc2626;
    background: #fee2e2;
}
.user-details {
    flex: 1;
}
.username {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
}
.user-meta {
    font-size: 14px;
    color: #64748b;
    margin-top: 2px;
}
.status-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 20px;
    margin: 20px 0 16px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 1;
}
.status-banner .banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}
.status-banner .banner-content {
    flex: 1;
}
.status-banner .banner-title {
    font-weight: 600;
    font-size: 17px;
    color: #1e293b;
}
.status-banner .banner-desc {
    font-size: 14px;
    color: #475569;
    margin-top: 2px;
    line-height: 1.5;
}
.status-banner.success {
    border-left: 4px solid #22c55e;
}
.status-banner.warning {
    border-left: 4px solid #eab308;
}
.status-banner code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
}
.msg-box {
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    position: relative;
    z-index: 1;
}
.msg-box.error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
.msg-box.success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.msg-box .msg-icon {
    font-size: 20px;
}
.card-form {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 20px 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.card-form .input-group {
    margin-bottom: 0;
}
.card-form .input-wrap {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
}
.card-form .input-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}
.card-form .input-wrap .input-icon {
    padding: 0 12px 0 16px;
    font-size: 18px;
    color: #9ca3af;
}
.card-form .input-wrap input {
    flex: 1;
    padding: 16px 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #1f2937;
    min-width: 0;
}
.card-form .input-wrap input::placeholder {
    color: #9ca3af;
}
.card-form .btn-activate-full {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.card-form .btn-activate-full:active {
    transform: scale(0.97);
}
.card-form .form-hint {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}
.menu-list {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.1s;
}
.menu-item:last-child {
    border-bottom: none;
}
.menu-item:active {
    background: #f1f5f9;
}
.menu-item .menu-icon {
    font-size: 22px;
    margin-right: 16px;
}
.menu-item .menu-label {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}
.menu-item .menu-arrow {
    font-size: 24px;
    color: #94a3b8;
}

/* ===== 播放页 ===== */
.video-wrapper {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin: 12px 0;
}
video {
    width: 100%;
    display: block;
    max-height: 60vh;
    background: #000;
}

/* ===== 通用工具 ===== */
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }

/* ===== 搜索框 ===== */
.page-header {
    margin-bottom: 16px;
}
.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.search-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}
.search-inner {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 60px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    overflow: hidden;
}
.search-inner:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}
.search-icon {
    flex-shrink: 0;
    padding: 0 4px 0 14px;
    font-size: 16px;
    color: #94a3b8;
}
.search-inner input {
    flex: 1;
    min-width: 0;
    padding: 12px 4px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1e293b;
}
.search-inner input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.search-inner button {
    flex-shrink: 0;
    padding: 8px 16px;
    margin: 4px 4px 4px 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.search-inner button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}
.search-inner button:active:not(:disabled) {
    transform: scale(0.95);
}
.search-tip {
    font-size: 13px;
    color: #8b5cf6;
    margin-top: 8px;
    padding-left: 4px;
    display: none;
    font-weight: 500;
}
.search-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px 16px 4px;
    font-size: 15px;
    color: #475569;
    border-bottom: 1px solid #e9edf2;
    margin-bottom: 16px;
}
.search-status strong {
    color: #0f172a;
}
.clear-search {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 30px;
    background: #eef2ff;
    transition: background 0.2s;
}
.clear-search:hover {
    background: #c7d2fe;
}
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #94a3b8;
    font-size: 16px;
}

/* ===== 访问拒绝页面 ===== */
.denied-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 20px;
}
.denied-card {
    background: #fff;
    border-radius: 28px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6;
}
.denied-card .icon {
    font-size: 60px;
    margin-bottom: 16px;
}
.denied-card h2 {
    font-size: 24px;
    margin: 0 0 8px 0;
    color: #0f172a;
}
.denied-card p {
    color: #64748b;
    margin-bottom: 28px;
    font-size: 16px;
}
.denied-card .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.denied-card .btn {
    padding: 14px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    background: #f1f5f9;
    color: #1e293b;
    transition: background 0.2s;
}
.denied-card .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.denied-card .btn-primary:active {
    transform: scale(0.96);
}