/* ================================================================
   GTC 工作室 · 通用验证 — 全局样式
   设计概念：「数字信任印记」— 精密工程 × 认证权威
   ================================================================ */

/* ===== CSS 变量 ===== */
:root {
    --ink: #0a1628;
    --ink-light: #162033;
    --gold: #c9a94e;
    --gold-dark: #b8923a;
    --gold-gradient: linear-gradient(135deg, #c9a94e, #b8923a);
    --steel: #2d4a6b;
    --steel-light: #3d6080;
    --stone: #f0ece4;
    --white: #ffffff;
    --gray-50: #fafaf9;
    --gray-100: #f5f4f0;
    --gray-200: #e8e5dc;
    --gray-400: #b0aca0;
    --gray-500: #8a8578;
    --gray-700: #4a4538;
    --red: #c0392b;
    --red-light: #fff0f0;
    --green: #27ae60;
    --green-light: #e6f7e6;
    --orange: #e67e22;
    --orange-light: #fff3e0;
    --blue: #2d4a6b;
    --blue-light: #e8f0fe;
    --shadow-sm: 0 1px 4px rgba(10, 22, 40, 0.04);
    --shadow-md: 0 2px 12px rgba(10, 22, 40, 0.06);
    --shadow-lg: 0 8px 30px rgba(10, 22, 40, 0.12);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
}

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background-color: var(--stone);
    color: #333;
    line-height: 1.6;
}

/* ===== 导航栏 ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--ink);
    padding: 0 28px;
    height: 62px;
    border-bottom: 1px solid rgba(201, 169, 78, 0.25);
    position: relative;
    z-index: 100;
}

/* --- 左侧：品牌 + 导航链接 --- */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 52px;
}

/* --- 品牌区 --- */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ffffff;
    flex-shrink: 0;
}

.navbar-brand img {
    height: 34px;
    width: auto;
}

.navbar-brand .separator {
    color: rgba(201, 169, 78, 0.5);
    font-size: 22px;
    font-weight: 300;
    user-select: none;
}

.navbar-brand .brand-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #e8e2d0;
}

/* --- 导航链接 --- */
.navbar-nav {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
}

.navbar-nav li a {
    display: block;
    padding: 8px 18px;
    color: #b0aca0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    position: relative;
}

.navbar-nav li a:hover {
    color: #ffffff;
    background-color: rgba(201, 169, 78, 0.08);
}

.navbar-nav li a.active {
    color: var(--gold);
    background-color: rgba(201, 169, 78, 0.1);
}

/* --- 右侧：汉堡按钮 + 认证按钮 --- */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* --- 认证按钮通用 --- */
.btn-auth {
    display: inline-block;
    padding: 7px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-login {
    color: #c9a94e;
    border: 1px solid rgba(201, 169, 78, 0.4);
    background: transparent;
}

.btn-login:hover {
    color: #ffffff;
    border-color: var(--gold);
    background-color: rgba(201, 169, 78, 0.1);
}

.btn-register {
    color: var(--ink);
    background: var(--gold-gradient);
    border: 1px solid transparent;
    font-weight: 600;
}

.btn-register:hover {
    background: linear-gradient(135deg, #d4b45a, #c29e44);
    box-shadow: 0 2px 8px rgba(201, 169, 78, 0.3);
}

.btn-logout {
    color: #b0aca0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 13px;
    padding: 6px 16px;
    background: transparent;
}

.btn-logout:hover {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.5);
    background-color: rgba(255, 107, 107, 0.06);
}

/* --- 用户名显示 --- */
.navbar-user {
    color: #e8e2d0;
    font-size: 14px;
    font-weight: 500;
}

.navbar-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- 汉堡菜单按钮（默认隐藏） --- */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    gap: 5px;
    flex-shrink: 0;
}

.navbar-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #b0aca0;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 汉堡按钮打开状态 → X */
.navbar-toggle.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--gold);
}

.navbar-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--gold);
}

/* ===== 主内容区 ===== */
.main-content {
    min-height: calc(100vh - 62px);
    padding: 40px;
}

/* ===== Hero 区域（主页） ===== */
.hero {
    background: linear-gradient(170deg, var(--ink) 0%, #162033 40%, #0d1f33 100%);
    margin: -40px -40px 0;
    padding: 80px 40px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 背景微妙的几何纹理 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(201, 169, 78, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 75% 20%, rgba(45, 74, 107, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(201, 169, 78, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hero h1 .highlight {
    color: var(--gold);
}

.hero .hero-subtitle {
    font-size: 17px;
    color: #8a8578;
    margin-bottom: 36px;
    font-weight: 400;
    line-height: 1.6;
}

.hero .hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-hero-primary {
    display: inline-block;
    padding: 13px 34px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(201, 169, 78, 0.25);
}

.hero .btn-hero-primary:hover {
    background: linear-gradient(135deg, #d4b45a, #c29e44);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201, 169, 78, 0.35);
}

.hero .btn-hero-secondary {
    display: inline-block;
    padding: 13px 34px;
    font-size: 15px;
    font-weight: 500;
    color: #c9a94e;
    background: transparent;
    border: 1px solid rgba(201, 169, 78, 0.4);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.25s ease;
}

.hero .btn-hero-secondary:hover {
    border-color: var(--gold);
    background: rgba(201, 169, 78, 0.08);
    color: #ffffff;
}

/* 已登录欢迎区 */
.hero-welcome {
    margin-top: 12px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
}

.hero-welcome strong {
    color: var(--gold);
}

/* ===== 特性卡片区 ===== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 960px;
    margin: -40px auto 0;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gold-gradient);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--gray-200);
}

.feature-card:hover::before {
    height: 60%;
}

.feature-card .feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.feature-card p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ===== 表单页面（登录 / 注册） ===== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 62px);
    background-color: var(--stone);
    padding: 24px;
}

.auth-container {
    background: var(--white);
    padding: 44px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

/* 卡片顶部金色装饰条 */
.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.auth-container h1 {
    text-align: center;
    font-size: 26px;
    margin-bottom: 6px;
    color: var(--ink);
    letter-spacing: -0.3px;
    font-weight: 700;
}

.auth-container .subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--gray-200);
}

.auth-container label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a4538;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-container input[type="text"],
.auth-container input[type="password"],
.auth-container input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    transition: all 0.25s;
    outline: none;
    background: var(--gray-50);
}

.auth-container input:focus {
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.1);
}

.auth-container .btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.auth-container .btn-submit:hover {
    background: linear-gradient(135deg, #d4b45a, #c29e44);
    box-shadow: 0 4px 14px rgba(201, 169, 78, 0.3);
    transform: translateY(-1px);
}

.auth-container .switch-link {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: var(--gray-500);
}

.auth-container .switch-link a {
    color: var(--steel);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-container .switch-link a:hover {
    color: var(--gold-dark);
}

/* --- 错误 / 成功提示 --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.alert-error {
    background-color: var(--red-light);
    color: var(--red);
    border: 1px solid #f5c6cb;
    border-left: 3px solid var(--red);
}

.alert-success {
    background-color: var(--green-light);
    color: var(--green);
    border: 1px solid #c3e6cb;
    border-left: 3px solid var(--green);
}

/* --- 滑块人机验证 --- */
.slider-captcha {
    margin-bottom: 18px;
}

.slider-captcha label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a4538;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider-status {
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 44px;
    background: #e8e5dc;
    border-radius: 22px;
    overflow: hidden;
    user-select: none;
    cursor: default;
}

.slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #c9a94e, #b8923a);
    border-radius: 22px 0 0 22px;
    transition: width 0.3s ease;
}

.slider-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #999;
    pointer-events: none;
    transition: opacity 0.2s;
    letter-spacing: 0.5px;
}

.slider-handle {
    position: absolute;
    left: 0;
    top: 2px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gold-dark);
    cursor: grab;
    transition: left 0.3s ease;
    z-index: 2;
}

.slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

@keyframes sliderShake {
    0%, 100% { left: 0; }
    25% { left: -6px; }
    75% { left: 6px; }
}

/* --- 邮箱验证码步骤 --- */
.verify-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--blue-light);
    border-radius: var(--radius-md);
    border: 1px solid #d4e0f0;
}

.verify-info p {
    font-size: 14px;
    color: var(--steel);
    margin: 0;
}

.verify-info strong {
    color: var(--ink);
    word-break: break-all;
}

.verify-info .verify-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.input-code {
    font-family: "Consolas", "Courier New", monospace !important;
    font-size: 22px !important;
    letter-spacing: 8px !important;
    text-align: center;
    padding: 14px 10px !important;
}

.input-code::placeholder {
    font-size: 13px;
    letter-spacing: 1px;
}

.btn-resend {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    font-size: 13px;
    color: var(--steel);
    background: transparent;
    border: 1px dashed var(--gray-400);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-resend:hover {
    color: var(--gold-dark);
    border-color: var(--gold);
    background: rgba(201, 169, 78, 0.05);
}

/* ===== 通用按钮 ===== */
.btn-primary {
    display: inline-block;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    background: var(--gold-gradient);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d4b45a, #c29e44);
    box-shadow: 0 4px 12px rgba(201, 169, 78, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    color: #4a4538;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: rgba(201, 169, 78, 0.04);
}

.btn-sm {
    padding: 5px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s;
}

.btn-danger {
    color: #fff;
    background-color: #d9534f;
    border-color: #d9534f;
}

.btn-danger:hover {
    background-color: #c9302c;
    border-color: #c9302c;
}

.btn-danger-text {
    color: #d9534f;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    transition: all 0.2s;
}

.btn-danger-text:hover {
    color: #c9302c;
    text-decoration: underline;
}

.btn-edit-text {
    color: var(--steel);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    transition: all 0.2s;
}

.btn-edit-text:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

.btn-device-text {
    color: var(--green);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-device-text:hover {
    color: #1e8449;
    text-decoration: underline;
}

/* ===== 页面头部 ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 24px;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ===== 级别信息条 ===== */
.level-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
    border-left: 3px solid var(--gray-200);
}

.level-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.level-normal {
    background: #6c757d;
}

.level-premium {
    background: var(--gold-gradient);
    color: var(--ink);
}

.level-admin {
    background: var(--red);
}

.level-limits strong {
    color: #333;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
    font-size: 15px;
}

/* ===== 项目卡片列表 ===== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-200);
}

/* 卡片悬停左侧金色验证条 */
.project-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 0;
    width: 3px;
    background: var(--gold-gradient);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.project-card:hover::before {
    height: 45%;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    gap: 16px;
    flex-wrap: wrap;
}

.project-info {
    min-width: 0;
}

.project-name {
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.project-meta {
    font-size: 13px;
    color: var(--gray-500);
}

.project-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ===== 折叠面板 ===== */
.project-panels {
    padding: 0;
}

.panel {
    border-bottom: 1px solid var(--gray-100);
}

.panel:last-child {
    border-bottom: none;
}

.panel-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #4a4538;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.panel-toggle:hover {
    background: var(--gray-50);
}

.panel-toggle .arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--gold);
    transition: transform 0.25s;
}

.panel-toggle .badge {
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 4px;
    font-weight: 600;
}

.panel-body {
    display: none;
    padding: 0 24px 20px 24px;
}

/* ===== 内联表单 ===== */
.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.inline-form label {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.inline-form select {
    padding: 7px 12px;
    font-size: 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    outline: none;
    transition: border-color 0.25s;
}

.inline-form select:focus {
    border-color: var(--gold);
}

/* ===== 数据表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.data-table th {
    font-weight: 600;
    color: #6b6560;
    background: #faf9f5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #fdfcfa;
}

/* ===== 激活码文字 ===== */
.code-text {
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
    font-size: 13px;
    background: #faf9f5;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
    border: 1px solid var(--gray-200);
    color: var(--ink);
}

/* ===== 激活码输入行 ===== */
.code-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.code-input-row input[type="text"] {
    padding: 10px 14px;
    font-size: 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s;
}

.code-input-row input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.1);
}

.field-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ===== 表单辅助行 ===== */
.form-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row input[type="number"] {
    padding: 8px 10px;
    font-size: 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.25s;
}

.form-row input[type="number"]:focus {
    border-color: var(--gold);
}

.form-row input[type="number"]:disabled {
    background: var(--gray-100);
    color: #aaa;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--gold);
}

/* ===== 无限设备标签 ===== */
.unlimited-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    background: var(--blue-light);
    color: var(--blue);
}

/* ===== 设备列表 ===== */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.device-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 0;
}

.device-time {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
}

/* ===== 状态标签 ===== */
.status-tag {
    display: inline-block;
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-active {
    background: var(--green-light);
    color: var(--green);
}

.status-used {
    background: var(--orange-light);
    color: var(--orange);
}

.status-expired {
    background: rgba(192, 57, 43, 0.08);
    color: var(--red);
}

.muted {
    color: var(--gray-500);
    font-size: 14px;
    padding: 8px 0;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.5);
    z-index: 200;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    font-size: 17px;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.2px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gray-500);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px 24px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a4538;
}

.modal-body input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s;
    background: var(--gray-50);
}

.modal-body input:focus {
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.1);
}

.modal-body select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    outline: none;
    transition: border-color 0.25s;
}

.modal-body select:focus {
    border-color: var(--gold);
}

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

/* ===== 页脚 ===== */
.site-footer {
    background: var(--ink);
    border-top: 1px solid rgba(201, 169, 78, 0.2);
    padding: 0;
    color: #b0aca0;
    font-size: 13px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 40px 28px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    color: #e8e2d0;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.footer-col p {
    color: #8a8578;
    line-height: 1.8;
    font-size: 13px;
    margin-bottom: 4px;
}

.footer-col a {
    display: block;
    color: #8a8578;
    text-decoration: none;
    padding: 3px 0;
    transition: color 0.2s;
    font-size: 13px;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 12px;
    color: #6b6560;
}

/* ===== 下载页 ===== */
.download-section {
    margin-bottom: 36px;
}

.download-section h2 {
    font-size: 19px;
    color: var(--ink);
    margin-bottom: 6px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(201, 169, 78, 0.25);
    font-weight: 700;
    letter-spacing: -0.2px;
}

.download-section .section-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 18px;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-md);
    gap: 16px;
    flex-wrap: wrap;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.download-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-200);
}

.download-info {
    min-width: 0;
}

.download-info h3 {
    font-size: 17px;
    color: var(--ink);
    margin-bottom: 4px;
    font-weight: 700;
}

.download-info .meta {
    font-size: 13px;
    color: var(--gray-500);
}

.download-info .meta span {
    margin-right: 16px;
}

.download-info .sha256 {
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
    font-size: 11px;
    color: #aaa;
    word-break: break-all;
    margin-top: 4px;
    user-select: all;
    cursor: copy;
    transition: color 0.2s;
}

.download-info .sha256:hover {
    color: var(--gray-700);
}

.btn-download {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    background: var(--gold-gradient);
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-download:hover {
    background: linear-gradient(135deg, #d4b45a, #c29e44);
    box-shadow: 0 4px 12px rgba(201, 169, 78, 0.3);
}

.latest-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--green-light);
    color: var(--green);
    margin-left: 8px;
    font-weight: 600;
}

.page-desc {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ===== Markdown 文档页 (verify_api.php) ===== */
.md-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 36px 28px 60px;
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.md-container h1 {
    font-size: 29px;
    margin-bottom: 8px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(201, 169, 78, 0.3);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--ink);
}

.md-container h2 {
    font-size: 22px;
    margin: 30px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 700;
    color: var(--ink);
}

.md-container h3 {
    font-size: 18px;
    margin: 24px 0 10px;
    font-weight: 600;
    color: #2a3040;
}

.md-container p {
    line-height: 1.85;
    margin: 10px 0;
    color: #333;
}

.md-container a {
    color: var(--steel);
    text-decoration: none;
    transition: color 0.2s;
}

.md-container a:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

.md-container ul,
.md-container ol {
    padding-left: 24px;
    margin: 10px 0;
}

.md-container li {
    line-height: 1.8;
    margin: 4px 0;
}

.md-container code {
    background: #f0ede5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "Cascadia Code", "Consolas", "Courier New", monospace;
    font-size: 13px;
    color: #c7254e;
}

.md-container pre {
    background: #151d2b;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    overflow-x: auto;
    margin: 14px 0;
    border: 1px solid rgba(201, 169, 78, 0.15);
}

.md-container pre code {
    background: none;
    color: #e0e0e0;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
}

.md-container table {
    border-collapse: collapse;
    width: 100%;
    margin: 14px 0;
}

.md-container th,
.md-container td {
    border: 1px solid var(--gray-200);
    padding: 9px 16px;
    text-align: left;
}

.md-container th {
    background: #faf9f5;
    font-weight: 700;
    font-size: 13px;
}

.md-container blockquote {
    border-left: 4px solid var(--gold);
    padding: 4px 18px;
    margin: 14px 0;
    color: #666;
    background: #faf9f5;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.md-container hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 24px 0;
}

.md-container img {
    max-width: 100%;
}

/* ===== PDF 查看器 (gapi.php) ===== */
.pdf-wrapper {
    width: 100%;
    height: calc(100vh - 62px);
    overflow-y: auto;
    background: #3a3f47;
    text-align: center;
}

.pdf-wrapper canvas {
    display: block;
    margin: 0 auto 8px auto;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.pdf-wrapper canvas:first-child {
    margin-top: 14px;
}

.pdf-wrapper canvas:last-child {
    margin-bottom: 14px;
}

.pdf-error {
    padding: 60px 20px;
    text-align: center;
    color: var(--gray-500);
}

/* ===== 响应式：平板 (≤ 768px) ===== */
@media (max-width: 768px) {

    /* 显示汉堡按钮 */
    .navbar-toggle {
        display: flex;
    }

    /* 导航菜单改为垂直折叠 */
    .navbar-nav {
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--ink);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        gap: 0;
        z-index: 100;
        border-bottom: 1px solid rgba(201, 169, 78, 0.2);
    }

    /* 展开状态 */
    .navbar-nav.open {
        max-height: 340px;
    }

    .navbar-nav li {
        width: 100%;
    }

    .navbar-nav li a {
        padding: 14px 28px;
        border-radius: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
    }

    .navbar-nav li a.active {
        background: rgba(201, 169, 78, 0.08);
    }

    /* 认证按钮缩小 */
    .btn-auth {
        padding: 5px 14px;
        font-size: 12px;
    }

    .navbar-user {
        font-size: 13px;
    }

    .navbar-right {
        gap: 8px;
    }

    .navbar-auth {
        gap: 8px;
    }

    /* Hero 移动端 */
    .hero {
        padding: 60px 24px 70px;
    }

    .hero h1 {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .hero .hero-subtitle {
        font-size: 15px;
    }

    .hero .btn-hero-primary,
    .hero .btn-hero-secondary {
        padding: 11px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }

    /* 特性卡片 */
    .features {
        grid-template-columns: 1fr;
        margin-top: -30px;
        padding: 0 20px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    /* 主内容区 */
    .main-content {
        padding: 24px 16px;
    }

    /* 项目管理移动端 */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-header {
        flex-direction: column;
    }

    .project-actions {
        align-self: flex-end;
    }

    .inline-form {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    .modal {
        width: 95%;
        margin: 0 10px;
    }

    /* 下载项移动端 */
    .download-item {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 页脚移动端 */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 24px 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== 响应式：小手机 (≤ 480px) ===== */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }

    .hero .btn-hero-primary,
    .hero .btn-hero-secondary {
        width: 100%;
    }

    .hero .hero-actions {
        flex-direction: column;
    }

    .auth-container {
        padding: 32px 24px;
    }

    .navbar-brand .brand-text {
        font-size: 15px;
        letter-spacing: 1px;
    }

    .navbar-brand img {
        height: 28px;
    }

    .navbar-left {
        gap: 20px;
    }
}
