/* DCHYXSB v3 主题 - 基于 kvmidc 设计克隆 */

:root {
    --primary: #007bfc;
    --primary-dark: #0068d4;
    --primary-light: #eef6ff;
    --dark: #142149;
    --gray: #5e7290;
    --gray-light: #687895;
    --border: #dce6f2;
    --bg: #f8fafc;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(20, 33, 73, 0.08);
    --shadow-hover: 0 8px 30px rgba(20, 33, 73, 0.12);
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', Roboto, Arial, sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    font-size: 14px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === HEADER === */
.header-main {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(20,33,73,0.06);
}

.header-main nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #4a9fff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all .2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; }

.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #218838; color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c82333; color: white; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }

.cart-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--dark);
    font-weight: 500;
}

.cart-badge .badge {
    background: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, #eef6ff 0%, #f8fafc 50%, #fff 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,123,252,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-text { flex: 1; }

.hero-text h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-text h1 span { color: var(--primary); }

.hero-text p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons { display: flex; gap: 16px; margin-bottom: 40px; }

.hero-stats {
    display: flex;
    gap: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 500px;
}

.hero-stat {
    flex: 1;
    padding: 20px;
    text-align: center;
    border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }

.hero-stat strong {
    display: block;
    font-size: 28px;
    color: var(--primary);
    font-weight: 700;
}

.hero-stat span {
    display: block;
    font-size: 12px;
    color: var(--gray-light);
    margin-top: 4px;
}

.hero-visual {
    flex: 0 0 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual img {
    max-width: 100%;
    height: auto;
}

/* === SECTIONS === */
.section { padding: 70px 0; }
.section-gray { background: var(--bg); }

.section-head {
    text-align: center;
    margin-bottom: 50px;
}

.section-head .eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-head p {
    font-size: 16px;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* === ADVANTAGES === */
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.advantage {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all .3s;
}

.advantage:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.advantage .icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.advantage h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

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

/* === PRODUCTS === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.product-card.featured {
    border-color: var(--primary);
    border-width: 2px;
}

.product-card-head {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.product-card .icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #4a9fff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 26px;
}

.product-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.product-card .price {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.product-card .price small {
    font-size: 14px;
    color: var(--gray-light);
    font-weight: 400;
}

.product-card-body {
    padding: 24px;
    flex: 1;
}

.product-card .specs-list {
    list-style: none;
    margin-bottom: 20px;
}

.product-card .specs-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--gray);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-card .specs-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

.product-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.product-card .tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.product-card-foot {
    padding: 0 24px 24px;
}

.product-card .btn { width: 100%; }

/* === NETWORK === */
.network-section {
    background: linear-gradient(135deg, #142149 0%, #1a2a5c 100%);
    color: white;
    padding: 70px 0;
}

.network-section .section-head h2 { color: white; }
.network-section .section-head p { color: rgba(255,255,255,0.7); }
.network-section .section-head .eyebrow { color: #4a9fff; }

.network-nodes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.network-node {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.network-node .dot {
    width: 8px; height: 8px;
    background: #4a9fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #4a9fff;
}

.network-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.network-feature {
    text-align: center;
    color: rgba(255,255,255,0.8);
}

.network-feature strong {
    display: block;
    font-size: 24px;
    color: white;
    margin-bottom: 4px;
}

/* === METRICS === */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 50px 0;
}

.metric {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.metric .icon {
    width: 48px; height: 48px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.metric strong {
    display: block;
    font-size: 28px;
    color: var(--primary);
    font-weight: 700;
}

.metric span {
    color: var(--gray-light);
    font-size: 13px;
}

/* === FOOTER === */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.footer-brand a { color: rgba(255,255,255,0.7); display: block; margin-bottom: 6px; font-size: 14px; }
.footer-brand a:hover { color: white; }

.footer h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer a {
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.footer a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* === FORMS === */
.form-card {
    max-width: 420px;
    margin: 40px auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}

.form-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.form-card .sub {
    text-align: center;
    color: var(--gray);
    margin-bottom: 28px;
    font-size: 14px;
}

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

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

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,123,252,0.1);
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-card .btn { width: 100%; }

.form-card .footer-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* === ALERTS === */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* === TABLES === */
.table-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-card-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-card-head h3 {
    font-size: 18px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 24px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--dark);
}

table tr:last-child td { border-bottom: none; }

/* === BADGES === */
.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-secondary { background: #e9ecef; color: #495057; }

/* === PAYMENT === */
.payment-box {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
}

.payment-box h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.payment-box .order-info {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.wallet-box {
    background: linear-gradient(135deg, #142149 0%, #1a2a5c 100%);
    color: white;
    border-radius: var(--radius);
    padding: 24px;
    margin: 20px 0;
    text-align: center;
}

.wallet-box .label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-box .address {
    font-size: 16px;
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.1);
    padding: 12px 16px;
    border-radius: 6px;
    word-break: break-all;
    margin: 8px 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.wallet-box .network {
    font-size: 13px;
    color: #4a9fff;
    margin-top: 8px;
}

.wallet-box .amount {
    font-size: 32px;
    font-weight: 700;
    color: #4a9fff;
    margin-top: 12px;
}

.wallet-box .amount small {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
}

.qr-placeholder {
    width: 160px;
    height: 160px;
    margin: 16px auto;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* === USER DASHBOARD === */
.dashboard {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 40px 0;
}

.dashboard-side {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.dashboard-side .user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.dashboard-side .avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    margin: 0 auto 10px;
}

.dashboard-side .username {
    font-weight: 600;
    font-size: 15px;
}

.dashboard-side .menu {
    list-style: none;
}

.dashboard-side .menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--dark);
    font-size: 14px;
    margin-bottom: 4px;
}

.dashboard-side .menu a:hover, .dashboard-side .menu a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.dashboard-main {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

/* === ADMIN === */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 70px);
}

.admin-side {
    background: var(--dark);
    padding: 20px 0;
}

.admin-side .menu {
    list-style: none;
}

.admin-side .menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.admin-side .menu a:hover, .admin-side .menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-main {
    padding: 30px;
    background: var(--bg);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-header h1 {
    font-size: 22px;
    font-weight: 700;
}

/* === PRODUCT DETAIL === */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    padding: 40px 0;
}

.detail-main {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.detail-side {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    position: sticky;
    top: 90px;
}

.detail-side .price {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.qty-selector button {
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
}

.qty-selector input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
}

/* === CART === */
.cart-page { padding: 40px 0; }

.cart-list {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
}

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

.cart-item .info { flex: 1; }
.cart-item .info h4 { font-size: 16px; margin-bottom: 4px; }
.cart-item .info .specs { color: var(--gray); font-size: 13px; }

.cart-item .qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item .price-col {
    text-align: right;
    min-width: 100px;
}

.cart-item .price-col .unit { color: var(--gray); font-size: 13px; }
.cart-item .price-col .total { font-weight: 600; font-size: 16px; color: var(--primary); }

.cart-summary {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.cart-summary .row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.cart-summary .total-row {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    font-size: 20px;
    font-weight: 700;
}

.cart-summary .total-row .amount { color: var(--primary); }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}

.empty-state .icon { font-size: 60px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--dark); }

/* === RESPONSIVE === */
@media (max-width: 991px) {
    .hero-content { flex-direction: column; }
    .hero-visual { display: none; }
    .hero-text h1 { font-size: 36px; }
    .advantage-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
    .network-features { grid-template-columns: repeat(2, 1fr); }
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .dashboard { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-side { display: none; }
}

@media (max-width: 767px) {
    .nav-links { display: none; }
    .hero-text h1 { font-size: 28px; }
    .hero-text p { font-size: 15px; }
    .advantage-grid, .product-grid { grid-template-columns: 1fr; }
    .network-features { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .section-head h2 { font-size: 24px; }
    .cart-item { flex-wrap: wrap; }
    .cart-item .price-col { min-width: auto; }
}
