/* CSS Variables - 深色模式（默认） */
:root {
    --primary-color: #d4af37; /* Gold */
    --secondary-color: #00f2ff; /* Neon Blue */
    --bg-dark: #1a1a1a;
    --bg-darker: #0a0a0a;
    --bg-black: #000;
    --bg-card: #222;
    --bg-navbar: rgba(0, 0, 0, 0.9);
    --bg-footer: #000;
    --text-light: #f8f9fa;
    --text-muted: #6c757d;
    --border-color: #333;
    --border-secondary: #444;
    --card-bg: #222;
    --card-border: #444;
}

/* 浅色模式 */
[data-theme="light"] {
    --primary-color: #d4af37; /* Gold - 保持不变 */
    --secondary-color: #00a8cc; /* 稍深的蓝色 */
    --bg-dark: #f8f9fa;
    --bg-darker: #e9ecef;
    --bg-black: #e9ecef; /* 与bg-darker保持一致，使用浅白色 */
    --bg-card: #ffffff;
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --bg-footer: #f8f9fa;
    --text-light: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --border-secondary: #ced4da;
    --card-bg: #ffffff;
    --card-border: #dee2e6;
}

/* Global Styles */
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
}

/* Navigation */
.navbar {
    background-color: var(--bg-navbar) !important;
    border-bottom: 1px solid var(--primary-color);
    transition: background-color 0.3s ease;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: bold;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-link {
    color: var(--text-light) !important;
    margin-left: 1rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: bold;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #000;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #b3902e;
    border-color: #b3902e;
}

.btn-outline-primary {
    color: #d4af37;
    border-color: #d4af37;
}

.btn-outline-primary:hover {
    background-color: #d4af37;
    color: #000;
}

/* Footer */
footer {
    background-color: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

[data-theme="light"] .whatsapp-float {
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

/* Hero Section */
.hero-section {
    /* 默认背景 - 如果没有配置背景图片则使用此背景 */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://placehold.co/1920x1080/1a1a1a/333?text=Nightlife+Background');
    background-size: cover;
    background-position: center;
    height: 80vh;
    min-height: 500px;
    /* 背景图片和透明度将通过内联样式动态设置 */
}

.bg-darker {
    background-color: var(--bg-darker);
    transition: background-color 0.3s ease;
}

.bg-black {
    background-color: var(--bg-black);
    transition: background-color 0.3s ease;
}

/* Feature Icons */
.feature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    width: 3rem;
    font-size: 1.5rem;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    border-color: #d4af37 !important;
}

.product-img-wrapper {
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.product-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: cover;
}

.divider {
    height: 3px;
    width: 60px;
    margin-top: 1rem;
    background-color: #d4af37 !important;
}

/* Category Active State */
.list-group-item.active {
    background-color: #d4af37 !important;
    border-color: #d4af37 !important;
    color: #000 !important;
    font-weight: 600;
}

/* Social Media Icons */
footer a .fa-instagram {
    transition: all 0.3s ease;
}

footer a:hover .fa-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: scale(1.2);
    display: inline-block;
}

/* Animations */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: #000;
}

[data-theme="light"] .theme-toggle:hover {
    color: #000;
}

/* 浅色模式下的文本颜色调整 */
[data-theme="light"] .text-light {
    color: #212529 !important;
}

[data-theme="light"] .text-muted {
    color: #6c757d !important;
}

/* 浅色模式下所有区域的text-light文字统一为深色 */
[data-theme="light"] * .text-light {
    color: #212529 !important;
}

[data-theme="light"] section .text-light,
[data-theme="light"] div .text-light,
[data-theme="light"] p.text-light,
[data-theme="light"] h1.text-light,
[data-theme="light"] h2.text-light,
[data-theme="light"] h3.text-light,
[data-theme="light"] h4.text-light,
[data-theme="light"] h5.text-light,
[data-theme="light"] h6.text-light {
    color: #212529 !important;
}

/* 卡片样式统一 */
.card.bg-dark,
.card.bg-black {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-light) !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* 列表组项 */
.list-group-item.bg-dark {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-light) !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* 表单控件 */
.form-control.bg-dark,
.form-select.bg-dark {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-light) !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* 警告框 */
.alert.bg-dark {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    color: var(--text-light) !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* 导航栏下拉菜单 */
.navbar-collapse {
    transition: background-color 0.3s ease;
}

/* 浅色模式下的按钮优化 */
[data-theme="light"] .btn-outline-light {
    color: #212529 !important;
    border-color: #212529 !important;
    background-color: transparent;
}

[data-theme="light"] .btn-outline-light:hover {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #212529 !important;
}

/* 浅色模式下bg-black区域的文字颜色 - 使用更具体的选择器 */
[data-theme="light"] section.py-5.bg-black .text-light,
[data-theme="light"] section.bg-black .text-light,
[data-theme="light"] .bg-black .text-light {
    color: #212529 !important;
}

[data-theme="light"] section.py-5.bg-black h1.text-light,
[data-theme="light"] section.py-5.bg-black h2.text-light,
[data-theme="light"] section.py-5.bg-black h3.text-light,
[data-theme="light"] section.py-5.bg-black h4.text-light,
[data-theme="light"] section.py-5.bg-black h5.text-light,
[data-theme="light"] section.py-5.bg-black h6.text-light,
[data-theme="light"] section.bg-black h1.text-light,
[data-theme="light"] section.bg-black h2.text-light,
[data-theme="light"] section.bg-black h3.text-light,
[data-theme="light"] section.bg-black h4.text-light,
[data-theme="light"] section.bg-black h5.text-light,
[data-theme="light"] section.bg-black h6.text-light,
[data-theme="light"] .bg-black h1.text-light,
[data-theme="light"] .bg-black h2.text-light,
[data-theme="light"] .bg-black h3.text-light,
[data-theme="light"] .bg-black h4.text-light,
[data-theme="light"] .bg-black h5.text-light,
[data-theme="light"] .bg-black h6.text-light {
    color: #212529 !important;
}

[data-theme="light"] section.py-5.bg-black p.text-light,
[data-theme="light"] section.py-5.bg-black .lead.text-light,
[data-theme="light"] section.py-5.bg-black span.text-light,
[data-theme="light"] section.py-5.bg-black small.text-light,
[data-theme="light"] section.bg-black p.text-light,
[data-theme="light"] section.bg-black .lead.text-light,
[data-theme="light"] section.bg-black span.text-light,
[data-theme="light"] section.bg-black small.text-light,
[data-theme="light"] .bg-black p.text-light,
[data-theme="light"] .bg-black .lead.text-light,
[data-theme="light"] .bg-black span.text-light,
[data-theme="light"] .bg-black small.text-light {
    color: #212529 !important;
}

/* 浅色模式下bg-black区域内所有text-light类元素 */
[data-theme="light"] section.py-5.bg-black .text-light,
[data-theme="light"] section.py-5.bg-black h1, 
[data-theme="light"] section.py-5.bg-black h2, 
[data-theme="light"] section.py-5.bg-black h3, 
[data-theme="light"] section.py-5.bg-black h4, 
[data-theme="light"] section.py-5.bg-black h5, 
[data-theme="light"] section.py-5.bg-black h6,
[data-theme="light"] section.py-5.bg-black p {
    color: #212529 !important;
}

/* 浅色模式下bg-darker区域的文字颜色（非背景图片区域） */
[data-theme="light"] section.py-5.bg-darker .text-light:not([style*="background"]) {
    color: #212529 !important;
}

/* 浅色模式下footer的文字颜色 */
[data-theme="light"] footer .text-light,
[data-theme="light"] footer p.text-light,
[data-theme="light"] footer ul.text-light,
[data-theme="light"] footer li.text-light,
[data-theme="light"] footer a.text-light,
[data-theme="light"] footer small.text-light {
    color: #212529 !important;
}

/* 浅色模式下card-header.bg-black */
[data-theme="light"] .card-header.bg-black {
    background-color: var(--bg-darker) !important;
    color: var(--text-light) !important;
    border-color: var(--card-border) !important;
}

/* 浅色模式下about页面的背景图片优化 */
[data-theme="light"] section.bg-darker {
    position: relative;
}

[data-theme="light"] section.bg-darker::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)) !important;
    z-index: 0;
    pointer-events: none;
}

[data-theme="light"] section.bg-darker > * {
    position: relative;
    z-index: 1;
}

/* 浅色模式下about页面背景图片区域的文字颜色确保可见 */
[data-theme="light"] section.bg-darker .text-light {
    color: #212529 !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

[data-theme="light"] section.bg-darker h1.text-light,
[data-theme="light"] section.bg-darker h2.text-light,
[data-theme="light"] section.bg-darker h3.text-light,
[data-theme="light"] section.bg-darker h4.text-light,
[data-theme="light"] section.bg-darker h5.text-light,
[data-theme="light"] section.bg-darker h6.text-light,
[data-theme="light"] section.bg-darker p.text-light,
[data-theme="light"] section.bg-darker .lead.text-light {
    color: #212529 !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* 浅色模式下contact页面输入框优化 */
[data-theme="light"] .form-control.bg-dark,
[data-theme="light"] textarea.form-control.bg-dark {
    background-color: #ffffff !important;
    border-color: var(--card-border) !important;
    color: var(--text-light) !important;
}

[data-theme="light"] .form-control.bg-dark::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

[data-theme="light"] .form-control.bg-dark:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    color: var(--text-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}
