/*
 * CyberTech - High-End AI Tech Theme for Dujiaoka
 * Designed by Antigravity
 */

:root {
    --bg-base: #030712;
    --bg-secondary: #0f172a;
    --bg-glass: rgba(3, 7, 18, 0.7) !important;
    --bg-glass-card: rgba(30, 41, 59, 0.4) !important;

    --accent-start: #06b6d4;
    /* Neon Cyan */
    --accent-end: #8b5cf6;
    /* Electric Violet */
    --accent-gradient: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    --accent-glow: rgba(6, 182, 212, 0.4);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-light: #64748b;

    --border-light: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(6, 182, 212, 0.3);

    --glass-blur: blur(20px);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-neon: 0 0 20px rgba(6, 182, 212, 0.15), 0 0 40px rgba(139, 92, 246, 0.1);
}

/* Global Atmosphere */
body {
    background-color: var(--bg-base) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', 'Outfit', -apple-system, sans-serif !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Aurora Effects */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

body::before {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-start), transparent 60%);
    animation: float 20s infinite ease-in-out;
}

body::after {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--accent-end), transparent 60%);
    animation: float 25s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
}

/* Navbar Style */
.header {
    background: rgba(3, 7, 18, 0.8) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border-bottom: 1px solid var(--border-light) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important; /* 彻底移除上下内边距，使边线极致贴近内容 */
}

.navbar-brand {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: all 0.3s ease !important;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    text-shadow: 0 0 10px var(--accent-start);
}

/* Hero Section */
.category h3 {
    font-family: 'Outfit', sans-serif !important;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.category .separator {
    background: var(--accent-gradient);
    height: 4px;
    box-shadow: 0 0 15px var(--accent-start);
}

/* ULTRA-High Visibility Tech Cards */
.goods-list .goods-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .goods-list .goods-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.goods-list .goods-grid>.col {
    padding: 0;
}

/* Global Card Theme - Applied to all pages including Buy Page */
.card {
    background: #0f172a !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card .card-header {
    background: rgba(30, 41, 59, 0.4) !important;
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--accent-start) !important;
}

label {
    color: var(--text-secondary) !important;
}

/* Specific for Goods List Grid */
.goods-list .card {
    border: 1px solid rgba(34, 211, 238, 0.5) !important;
    border-radius: var(--radius-xl) !important;

    position: relative;
    overflow: hidden !important;
    /* Fix for iOS Safari/Chrome clipping issue */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    transform: translateZ(0);
    isolation: isolate;

    box-shadow: 0 0 15px rgba(34, 211, 238, 0.15) !important;

    /* Layout Logic - Text Compact */
    display: flex;
    flex-direction: column;
    height: 100% !important;
    min-height: 200px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Image Containment - HIDDEN */
.goods-list .card img {
    display: none !important;
}

/* Card Title Area - Full Content */
.goods-list .card .card-body {
    padding: 1.1rem 0.9rem 1.6rem !important;
    background: #0f172a !important;
    height: auto !important;
    min-height: 120px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    z-index: 6;
    border-top: none !important;
    /* No top border needed without image */
    position: relative;
}

.goods-list .card .card-body h6 {
    color: #fff !important;
    font-size: 0.975rem !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    margin-bottom: 0.4rem !important;
    /* Space from price */
    margin-top: 0 !important;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    max-height: 2.8em;
    min-height: 2.8em;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-list .card .goods-price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.9rem;
    margin-bottom: 0.2rem;
}

/* Price - Convert from Button look to Text look */
.goods-list .card .card-body .btn-sm.btn-outline-success {
    background: transparent !important;
    border: none !important;
    color: #22d3ee !important;
    /* Cyan price */
    font-size: 1.275rem !important;
    font-weight: 800 !important;
    padding: 0 !important;
    text-align: left;
    width: auto !important;
    display: block;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

/* Discount Icon in price removal or styling */
.goods-list .card .card-body .btn-sm.btn-outline-success i {
    display: none;
    /* Hide icon for cleaner look */
}

/* Stock Text */
.goods-list .card .card-body .text-muted {
    font-size: 0.925rem !important;
    color: #64748b !important;
    display: inline-block;
    margin-bottom: 0;
}

.goods-list .card .goods-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.45rem;
    margin-bottom: 0.8rem;
}

/* Order Button - Distinct and Compact */
.goods-list .card .card-body .btn-primary {
    width: 100% !important;
    display: inline-block;
    position: static;
    margin-top: 0;
    padding: 6px 0 !important;
    font-size: 0.82rem !important;
    border-radius: 6px !important;
    /* Match badge slightly */
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end)) !important;

    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3) !important;
    color: #ffffff !important;
    /* FIXED: White text for contrast */
    font-weight: 800 !important;
    /* Bold for clarity */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    letter-spacing: 0.5px;
    z-index: 10;
}

.goods-list .card .card-body .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(6, 182, 212, 0.5) !important;
}

/* Hover State - "Reactor Core" Effect */
.goods-list .card:hover {
    transform: translateY(-5px) !important;
    border-color: #a78bfa !important;
    /* Switch to Purple on hover */
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.6), inset 0 0 20px rgba(34, 211, 238, 0.2) !important;
    background: #1e293b !important;
}

.goods-list .card:hover img {
    transform: scale(1.02);
    background-color: #fff;
    /* Pure white on hover */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


/* Neon Buttons */
.btn-primary,
.buy-btn {
    background: var(--bg-base) !important;
    border: 1px solid var(--accent-start) !important;
    color: var(--accent-start) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2) !important;
    border-radius: var(--radius-pill) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--accent-start) !important;
    color: #000 !important;
    box-shadow: 0 0 25px var(--accent-start) !important;
    transform: translateY(-2px);
}

/* Filtering Tabs */
.btn-outline-secondary {
    border-color: var(--border-light) !important;
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.btn-outline-secondary.active,
.btn-outline-secondary:hover {
    border-color: var(--accent-end) !important;
    color: var(--accent-end) !important;
    background: rgba(139, 92, 246, 0.1) !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2) !important;
}

/* Badges */
/* Badges - Rectangular & Sharp */
.card .badge {
    z-index: 20 !important;
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    border-radius: 2px !important;
    /* Rectangular shape */
}

.goods-list .card .badge {
    left: auto !important;
    right: 0.4rem !important;
    top: 0.4rem !important;
    border-radius: 0 !important;
    transform: scale(0.5);
    transform-origin: top right;
}

.badge.bg-success {
    background: rgba(6, 182, 212, 0.2) !important;
    color: var(--accent-start) !important;
    border: 1px solid rgba(6, 182, 212, 0.5);
    backdrop-filter: blur(5px);
}

.badge.bg-warning {
    background: rgba(139, 92, 246, 0.2) !important;
    color: var(--accent-end) !important;
    border: 1px solid rgba(139, 92, 246, 0.5);
    backdrop-filter: blur(5px);
}

/* Announcement */
.notice .card {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.05), rgba(139, 92, 246, 0.05)) !important;
    border: 1px solid var(--border-light) !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* ... fonts ... */
}

/* Form Visibility Adjustments */
.form-control,
.form-select {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid var(--border-light) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    background-color: rgba(30, 41, 59, 0.9) !important;
    border-color: var(--accent-start) !important;
    box-shadow: 0 0 10px var(--accent-glow) !important;
}

/* --- New Navigation & Search Styles --- */
.header-content {
    height: 66px;
    width: 100%;
}

.logo-box {
    margin-right: 18px;
    /* Adjusted for better spacing */
    transition: transform 0.3s ease;
    padding-left: 0;
}

.logo-box:hover {
    transform: scale(1.05);
}

.nav-logo {
    height: 38px !important;
    width: auto !important;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-links-list {
    list-style: none;
    gap: 16px;
    margin-left: -5px;
    /* Very close to logo */
}

/* Breathing Style for Nav Items */
.nav-breath-item {
    position: relative;
    /* transition: all 0.4s ease;  -- Remove generic transition to prevent layout jump on mobile load */
}

.nav-breath-item .nav-link {
    padding: 6px 4px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    letter-spacing: 1px;
    color: var(--text-secondary) !important;
    text-transform: uppercase;
    /* Only transition color and shadow, avoid transitioning font-size/padding which causes "shaking" on mobile load */
    transition: color 0.4s ease, text-shadow 0.4s ease !important;
}

.nav-breath-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    box-shadow: 0 0 10px var(--accent-start);
    transition: width 0.4s ease;
}

.nav-breath-item:hover .nav-link,
.nav-breath-item:has(.active) .nav-link {
    color: #fff !important;
    text-shadow: 0 0 15px var(--accent-start);
    /* No animation - stable on refresh */
}

.nav-breath-item:hover::after,
.nav-breath-item:has(.active)::after {
    width: 100%;
}

@keyframes textBreath {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.category {
    padding: 20px 0 !important;
}

/* Advanced Search Bar Redesign - Centered on Home */
.search-tech-wrapper {
    position: relative;
    width: 280px;
}

.search-tech-wrapper.home-search {
    width: 480px;
    /* Larger for home page prominence */
    margin: 0 auto 20px;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 4px 8px 4px 22px;
    backdrop-filter: var(--glass-blur);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.search-input-group:hover {
    border-color: var(--accent-glow);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
}

.search-input-group:focus-within {
    border-color: var(--accent-start);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(6, 182, 212, 0.05);
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
}

.search-tech-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    width: 100%;
    outline: none !important;
    padding: 10px 0;
    font-family: 'Outfit', sans-serif;
}

.search-tech-input::placeholder {
    color: var(--text-light);
    opacity: 0.6;
}

.search-tech-btn {
    background: var(--accent-gradient);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--accent-glow);
}

.search-tech-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 25px var(--accent-start);
}

.search-tech-btn i {
    font-size: 16px;
}

@media (max-width: 991px) {
    .header-left {
        width: 100%;
        justify-content: flex-start;
    }

    .main-nav-box {
        display: flex !important;
    }

    .logo-box {
        margin-right: 20px;
    }

    .nav-links-list {
        gap: 12px;
    }

    .nav-breath-item .nav-link {
        font-size: 0.85rem !important;
        padding: 5px 2px !important;
        letter-spacing: 0px;
    }

    .header-content {
        justify-content: flex-start;
    }

    .search-tech-wrapper.home-search {
        width: 100%;
        max-width: 90%;
    }

    .header-right {
        margin-left: auto;
    }
}

/* Premium Nav Buttons */
.nav-user-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.nav-user-btn:hover {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.nav-user-btn svg {
    width: 20px;
    height: 20px;
}

/* Premium Info Button V2 - Cleaner and positioned next to text */
.info-btn-premium-v2 {
    color: var(--accent-cyan);
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.3));
    padding: 0;
    margin-left: 8px;
    vertical-align: middle;
}

.info-btn-premium-v2:hover {
    color: #fff;
    filter: drop-shadow(0 0 10px var(--accent-cyan));
    transform: scale(1.1);
}

/* Custom Login Button - Outlined style based on user image */
.login-btn-custom {
    background: transparent !important;
    border: 1px solid rgba(156, 163, 175, 0.5) !important; /* 调整为灰色半透明边框 */
    color: #9ca3af !important; /* 文字调整为灰色 */
    border-radius: 8px !important; /* 减小圆角 */
    padding: 3px 12px !important; /* 减小内边距，调小尺寸 */
    font-size: 0.75rem !important; /* 减小字号至约 12px */
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.login-btn-custom:hover {
    background: rgba(156, 163, 175, 0.1) !important;
    border-color: #9ca3af !important;
    color: #fff !important; /* 悬停时恢复白色提升交互感 */
    transform: translateY(-1px);
}

/* Premium Info Button */
.info-btn-premium {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.info-btn-premium:hover {
    background: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.1);
}

.info-btn-premium::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    opacity: 0;
    animation: ripple-pulse 2s infinite;
}

@keyframes ripple-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Premium Benefit Cards */
.benefit-card-premium {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.benefit-card-gold {
    border-color: rgba(251, 191, 36, 0.3);
}

.benefit-card-gold::before {
    background: linear-gradient(to bottom, #FBBF24, #D97706);
}

.benefit-card-gold .benefit-title {
    color: #FBBF24;
}

.benefit-card-diamond {
    border-color: rgba(56, 189, 248, 0.3);
}

.benefit-card-diamond::before {
    background: linear-gradient(to bottom, #38BDF8, #0284C7);
}

.benefit-card-diamond .benefit-title {
    color: #38BDF8;
}

.benefit-card-black {
    border-color: rgba(168, 85, 247, 0.3);
}

.benefit-card-black::before {
    background: linear-gradient(to bottom, #A855F7, #6B21A8);
}

.benefit-card-black .benefit-title {
    color: #A855F7;
}

.benefit-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefit-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 576px) {
    .header-right {
        gap: 5px !important;
    }

    .login-btn-single {
        padding: 5px 12px !important;
        font-size: 0.8rem !important;
    }
}