/* ================= LoneLY 云主机商城 (PHP版) - 样式 ================= */
:root {
  --bg: #f4f7fb;
  --bg2: #e8eff8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --text: #1e293b;
  --text2: #475569;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --card: #ffffff;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(30, 58, 138, 0.08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.topbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.brand strong { display: block; font-size: 15px; line-height: 1.2; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: all 0.2s; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,0.32); }
.btn-ghost { background: rgba(37,99,235,0.06); color: var(--primary); border: 1px solid rgba(37,99,235,0.15); }
.btn-ghost:hover { background: rgba(37,99,235,0.1); }
.btn-danger { background: rgba(239,68,68,0.08); color: var(--danger); border: 1px solid rgba(239,68,68,0.15); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

main { min-height: calc(100vh - 160px); }
.hidden { display: none !important; }

.hero { position: relative; padding: 64px 20px 54px; background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0ea5e9 100%); color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; object-fit: cover; opacity: 0.18; pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; }
.hero h1 { font-size: clamp(32px, 7vw, 56px); font-weight: 900; margin: 0 0 8px; line-height: 1.15; text-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.hero h1 span { color: #a5f3fc; }
.hero p { font-size: clamp(15px, 3vw, 19px); color: rgba(255,255,255,0.92); max-width: 640px; margin: 0 0 28px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-btns .btn-primary { background: #10b981; box-shadow: 0 6px 20px rgba(16,185,129,0.35); }
.hero-btns .btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.25); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1100px; margin: 36px auto 0; position: relative; z-index: 2; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: clamp(26px, 5vw, 40px); font-weight: 800; }
.hero-stat .lab { font-size: 13px; color: rgba(255,255,255,0.78); }

.section { padding: 44px 16px; max-width: 1100px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(22px, 5vw, 32px); font-weight: 800; margin: 0 0 8px; }
.section-head p { color: var(--text2); font-size: 14px; margin: 0; }

.card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.glass { background: rgba(255,255,255,0.92); border: 1px solid rgba(255,255,255,0.5); border-radius: 16px; box-shadow: var(--shadow); }

.plan-tabs { display: inline-flex; gap: 8px; background: #eef2f7; padding: 5px; border-radius: 12px; margin-bottom: 24px; }
.plan-tabs button { padding: 8px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text2); }
.plan-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan-card { background: #fff; border-radius: 16px; padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform 0.2s; }
.plan-card:hover { transform: translateY(-3px); }
.plan-card h3 { margin: 0 0 6px; font-size: 17px; }
.plan-card .tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(37,99,235,0.1); color: var(--primary); margin-left: 6px; }
.plan-card .price { font-size: 30px; font-weight: 800; color: var(--primary); margin: 12px 0 14px; }
.plan-card .price small { font-size: 14px; color: var(--text2); font-weight: 500; }
.plan-card ul { list-style: none; margin: 0 0 18px; padding: 0; flex: 1; }
.plan-card li { font-size: 13px; color: var(--text2); padding: 5px 0; border-bottom: 1px dashed var(--border); }
.plan-card li:last-child { border-bottom: none; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature-card { background: #fff; border-radius: 16px; padding: 22px 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.feature-card .icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(37,99,235,0.08); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.feature-card h4 { margin: 0 0 8px; font-size: 16px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--text2); }

.satisfaction { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text2); }
.field input, .field textarea, .field select { padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: #fff; outline: none; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.field.full { grid-column: 1 / -1; }

.form-card { max-width: 520px; margin: 0 auto; padding: 26px 22px; }
.auth-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; text-align: center; }
.auth-sub { text-align: center; color: var(--text2); font-size: 13px; margin: 0 0 20px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.auth-tabs button { flex: 1; padding: 10px; font-size: 14px; font-weight: 600; color: var(--text2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tabs button.active { color: var(--primary); border-color: var(--primary); }
.row-inline { display: flex; gap: 10px; }
.row-inline input { flex: 1; }
.dev-code { background: #fef3c7; color: #92400e; padding: 10px 12px; border-radius: 8px; font-size: 12px; margin-top: 12px; }

.order-summary { background: #f8fafc; border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.order-summary .line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.order-summary .line:last-child { border-bottom: none; }
.status-pending { color: var(--warn); }
.status-paid { color: var(--primary); }
.status-shipped { color: var(--success); }
.status-canceled, .status-refunded { color: var(--muted); }

.pay-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.pay-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.pay-item:hover, .pay-item.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.pay-item img { border-radius: 8px; margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 700; color: var(--text2); background: #f8fafc; }
.muted { color: var(--muted); }
.mono { font-family: 'SF Mono', monospace; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.ok { background: rgba(16,185,129,0.1); color: var(--success); }
.badge.warn { background: rgba(245,158,11,0.1); color: var(--warn); }
.badge.info { background: rgba(37,99,235,0.1); color: var(--primary); }
.badge.mute { background: rgba(148,163,184,0.15); color: var(--muted); }
.badge.danger { background: rgba(239,68,68,0.1); color: var(--danger); }

.admin-shell { max-width: 1100px; margin: 20px auto; padding: 20px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 18px; }
.admin-tabs button { padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text2); }
.admin-tabs button.active { background: var(--primary); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 16px; text-align: center; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 24px; font-weight: 800; color: var(--primary); margin-top: 6px; }
.panel { padding: 18px; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-head .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.t-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 30px; text-align: center; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.upload-zone:hover { border-color: var(--primary); color: var(--primary); background: rgba(37,99,235,0.02); }
.upload-preview { max-width: 220px; border-radius: 10px; margin-top: 12px; border: 1px solid var(--border); }

.modal-root { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-root.show { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,0.55); }
.modal { position: relative; background: #fff; border-radius: 16px; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; background: #f1f5f9; color: var(--text2); }

.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-20px); z-index: 300; padding: 11px 20px; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: all 0.25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }
.toast.warn { background: var(--warn); color: #fff; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { font-size: 42px; margin-bottom: 10px; }

.footer { background: #0f172a; color: #cbd5e1; padding: 34px 16px 20px; margin-top: 40px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-main { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.footer-brand .logo { background: rgba(255,255,255,0.1); }
.footer-brand strong { display: block; font-size: 16px; }
.footer-brand p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.footer-info { font-size: 13px; line-height: 2; }
.footer-info p { margin: 0; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .topbar { padding: 10px 12px; }
  .hero { padding: 44px 16px 38px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-stat .num { font-size: 22px; }
  .hero-stat .lab { font-size: 11px; }
  .section { padding: 32px 12px; }
  .plan-grid, .feature-grid { grid-template-columns: 1fr; }
  .admin-tabs button { padding: 7px 11px; font-size: 12px; }
  .footer-main { flex-direction: column; }
}
