/* ==========================================================================
   传奇联机开服平台 - 前台样式
   ========================================================================== */

:root {
    --bg: #0e1320;
    --bg-soft: #151d2e;
    --card: #1a2334;
    --card-2: #202b40;
    --line: #2a354d;
    --text: #e9eef8;
    --muted: #8b9ab3;
    --primary: #3b74f5;
    --primary-2: #7b3ff2;
    --gold: #f4b740;
    --green: #22c07d;
    --red: #ef4b5c;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(1200px 600px at 12% -10%, #1c2740 0%, transparent 60%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #6b9bff; }

img { max-width: 100%; }

.container { width: 1200px; max-width: calc(100% - 32px); margin: 0 auto; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(14, 19, 32, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .inner {
    display: flex;
    align-items: center;
    gap: 26px;
    height: 66px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.logo img { height: 34px; }
.logo .dot {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff; font-weight: 700;
}

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: .2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }

.header-right { display: flex; align-items: center; gap: 10px; }
.header-right .who { color: var(--muted); font-size: 13px; }
.header-right .who b { color: var(--text); }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: var(--card-2);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: .2s;
    white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); color: #fff; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-gold { background: linear-gradient(135deg, #f7c463, #e79b1c); color: #24170a; font-weight: 600; }
.btn-green { background: linear-gradient(135deg, #29d68d, #12a468); color: #05221a; font-weight: 600; }
.btn-danger { background: rgba(239, 75, 92, .15); color: #ff8494; border-color: rgba(239, 75, 92, .35); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { color: #fff; border-color: #3d4a68; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- 卡片 / 通用块 ---------------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 16px; }
.card-head .more { color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }

.section { padding: 34px 0; }
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 700;
}
.section-title:before {
    content: "";
    width: 4px; height: 18px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--gold), var(--primary-2));
}
.section-title .tip { font-size: 13px; color: var(--muted); font-weight: 400; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------- 首页 Hero ---------------- */
.hero {
    padding: 46px 0 30px;
    background: radial-gradient(800px 300px at 20% 0%, rgba(59, 116, 245, .28), transparent 65%),
                radial-gradient(700px 320px at 82% 10%, rgba(123, 63, 242, .26), transparent 65%);
    border-bottom: 1px solid var(--line);
}
.hero h1 { font-size: 32px; margin: 0 0 12px; line-height: 1.35; }
.hero h1 span { background: linear-gradient(120deg, var(--gold), #fff 60%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 0 22px; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.stat {
    background: rgba(26, 35, 52, .8);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.stat .num { font-size: 24px; font-weight: 700; color: #fff; }
.stat .label { color: var(--muted); font-size: 13px; }

.notice-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(244, 183, 64, .1);
    border: 1px solid rgba(244, 183, 64, .3);
    color: #ffd894;
    font-size: 13px;
    margin-bottom: 6px;
}

/* ---------------- 区服卡片 ---------------- */
.server-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: .2s;
}
.server-card:hover { border-color: #3b5580; transform: translateY(-2px); }
.server-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.server-card .name { font-size: 16px; font-weight: 600; color: #fff; }
.server-card .addr { font-family: Consolas, Monaco, monospace; color: var(--gold); font-size: 13px; word-break: break-all; }
.server-card .desc { color: var(--muted); font-size: 13px; min-height: 42px; }
.server-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.server-card .fav { color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.server-card .fav.on { color: var(--gold); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 1.7;
    background: var(--card-2);
    color: var(--muted);
    border: 1px solid var(--line);
}
.badge-green { background: rgba(34, 192, 125, .14); color: #5fe0a6; border-color: rgba(34, 192, 125, .35); }
.badge-red { background: rgba(239, 75, 92, .14); color: #ff8f9d; border-color: rgba(239, 75, 92, .35); }
.badge-gold { background: rgba(244, 183, 64, .14); color: #ffcf76; border-color: rgba(244, 183, 64, .35); }
.badge-blue { background: rgba(59, 116, 245, .16); color: #8fb2ff; border-color: rgba(59, 116, 245, .38); }
.badge-purple { background: rgba(123, 63, 242, .16); color: #bda1ff; border-color: rgba(123, 63, 242, .38); }

.dot-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #55617a; margin-right: 5px; }
.dot-status.on { background: var(--green); box-shadow: 0 0 8px rgba(34, 192, 125, .9); }

/* ---------------- 列表 / 表格 ---------------- */
.list-simple { display: flex; flex-direction: column; }
.list-simple a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 4px;
    border-bottom: 1px dashed rgba(42, 53, 77, .8);
    color: var(--text);
    font-size: 14px;
}
.list-simple a:last-child { border-bottom: 0; }
.list-simple a:hover { color: #fff; }
.list-simple .date { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.data-table th { color: var(--muted); font-weight: 500; background: rgba(32, 43, 64, .5); white-space: nowrap; }
.data-table tr:hover td { background: rgba(255, 255, 255, .02); }
.data-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
}
.empty .big { font-size: 34px; margin-bottom: 8px; opacity: .5; }

/* ---------------- 表单 ---------------- */
.form-row { margin-bottom: 16px; }
.form-row > label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.form-row .req { color: var(--red); }
.input, select.input, textarea.input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #131b2a;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: .2s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 116, 245, .18); }
textarea.input { min-height: 96px; resize: vertical; }
.form-hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
    flex: 1;
    min-width: 150px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    background: #131b2a;
    transition: .2s;
}
.radio-card input { margin-right: 6px; }
.radio-card .t { font-weight: 600; color: #fff; }
.radio-card .d { color: var(--muted); font-size: 12px; }
.radio-card.on { border-color: var(--primary); background: rgba(59, 116, 245, .1); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--primary); }

.captcha-box { display: flex; gap: 10px; }
.captcha-box img {
    height: 42px; width: 130px; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--line); background: #fff;
}

/* ---------------- 提示 ---------------- */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13.5px;
    border: 1px solid transparent;
}
.alert-success { background: rgba(34, 192, 125, .12); border-color: rgba(34, 192, 125, .35); color: #6ee0ab; }
.alert-error { background: rgba(239, 75, 92, .12); border-color: rgba(239, 75, 92, .35); color: #ff97a4; }
.alert-info { background: rgba(59, 116, 245, .12); border-color: rgba(59, 116, 245, .35); color: #9dbcff; }
.alert-warn { background: rgba(244, 183, 64, .12); border-color: rgba(244, 183, 64, .35); color: #ffd489; }

/* ---------------- 页脚 ---------------- */
.site-footer {
    margin-top: 40px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    background: rgba(10, 14, 24, .6);
}
.site-footer .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: #fff; }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; gap: 6px; padding: 18px 0; flex-wrap: wrap; }
.pagination li { list-style: none; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    background: var(--card);
}
.pagination .active span { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }
.pagination a:hover { color: #fff; }

/* ---------------- 侧栏布局 ---------------- */
.layout-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.side-menu { padding: 10px; }
.side-menu a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 9px;
    color: var(--muted); font-size: 14px;
}
.side-menu a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-menu a.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.side-menu .divider { height: 1px; background: var(--line); margin: 8px 4px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 21px; }
.page-head .sub { color: var(--muted); font-size: 13px; }

/* ---------------- 详情 ---------------- */
.detail-list { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px 14px; }
.detail-list dt { color: var(--muted); font-size: 13px; padding: 8px 0; }
.detail-list dd { margin: 0; padding: 8px 0; border-bottom: 1px dashed rgba(42, 53, 77, .7); word-break: break-all; }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

.code-box {
    background: #0d1421;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 10px 12px;
    font-family: Consolas, Monaco, monospace;
    color: var(--gold);
    word-break: break-all;
}

/* ---------------- 支付 ---------------- */
.pay-amount-list { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-amount {
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #131b2a;
    cursor: pointer;
    font-weight: 600;
}
.pay-amount.on { border-color: var(--gold); color: var(--gold); background: rgba(244, 183, 64, .1); }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-method {
    border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center;
    cursor: pointer; background: #131b2a;
}
.pay-method.on { border-color: var(--primary); background: rgba(59, 116, 245, .1); }
.pay-method .ico { font-size: 22px; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 16px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: #fff; border-bottom-color: var(--primary); }

/* ---------------- 登录页 ---------------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.auth-card { width: 420px; max-width: 100%; }
.auth-card .brand { text-align: center; margin-bottom: 22px; }
.auth-card .brand .t { font-size: 22px; font-weight: 700; }
.auth-card .brand .s { color: var(--muted); font-size: 13px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 0; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap-8 { gap: 8px; }
.w-100 { width: 100%; }

@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-side { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .site-header .inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
    .nav { order: 3; width: 100%; overflow-x: auto; }
    .pay-methods { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 24px; }
}
