/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
   :root {
    --bg-main: #12151e;
    --bg-panel: #1b202c;
    --bg-item: #151923;
    --border-color: #2a3142;
    --text-primary: #e2e8f0;
    --text-secondary: #8b99ae;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-yellow: #eab308;
    --wechat-green: #07c160;
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', 'SimHei', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

button { background: none; border: none; cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.text-white { color: var(--text-primary); }
.text-gray { color: var(--text-secondary); }
.text-gray-dark { color: #4b5563; }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-yellow { color: var(--accent-yellow); }
.text-sm { font-size: 14px; }
.text-xl { font-size: 20px; }
.font-semibold { font-weight: 600; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.max-w-1200 { max-width: 1200px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }

/* ==========================================================================
   Layout
   ========================================================================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
@media (min-width: 1024px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    cursor: pointer;
}

.desktop-menu { display: none; gap: 32px; }
@media (min-width: 768px) { .desktop-menu { display: flex; } }

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover { color: var(--accent-blue); }
.nav-link.active { color: var(--text-primary); }

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text-secondary);
    border-radius: 6px;
}
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn:hover { color: var(--text-primary); background-color: var(--border-color); }
.mobile-menu-btn svg { width: 24px; height: 24px; }

.mobile-menu {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px 16px;
}
@media (min-width: 768px) { .mobile-menu { display: none !important; } }

.mobile-nav-link {
    text-align: left;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.mobile-nav-link:hover { background-color: var(--border-color); }
.mobile-nav-link.active { color: var(--text-primary); background-color: rgba(42, 49, 66, 0.5); }

/* ==========================================================================
   Components
   ========================================================================== */
.panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
}

.header-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (min-width: 768px) {
    .header-panel { flex-direction: row; justify-content: space-between; align-items: center; }
}

.title-area {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
@media (min-width: 768px) { .title-area { font-size: 20px; } }

.badge {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.btn-blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border-color: rgba(59, 130, 246, 0.3); }
.btn-green { background: rgba(34, 197, 94, 0.1); color: var(--accent-green); border-color: rgba(34, 197, 94, 0.3); }
a.btn-blue { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
a.btn-blue:hover { background: #2563eb; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-label { font-size: 14px; color: var(--text-secondary); }
.stat-value { font-size: 24px; font-weight: 600; }

/* Info Banner */
.info-banner {
    background-color: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 20px;
}
.info-banner.warning {
    background-color: rgba(234, 179, 8, 0.05);
    border-color: rgba(234, 179, 8, 0.2);
}
.info-title { font-size: 15px; font-weight: 600; color: var(--accent-blue); margin-bottom: 12px; }
.info-banner.warning .info-title { color: var(--accent-yellow); }
.info-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* Feature Cards */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.panel-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.panel-subtitle { font-size: 13px; color: var(--text-secondary); display: none; }
@media (min-width: 640px) { .panel-subtitle { display: block; } }

.feature-card {
    background-color: var(--bg-item);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent-blue); }
.feature-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.feature-header .icon { font-size: 20px; }
.feature-header .title { font-size: 15px; font-weight: 600; color: var(--text-primary); }

.feature-list { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.feature-list li { position: relative; padding-left: 16px; margin-bottom: 6px; }
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 4px;
    height: 4px;
    background-color: var(--text-secondary);
    border-radius: 50%;
}
.info-banner .feature-list li::before { display: none; }

.feature-result {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-green);
    display: inline-block;
    background: rgba(34, 197, 94, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
}

/* ==========================================================================
   Live Stats Iframe
   ========================================================================== */
.iframe-container {
    width: 100%;
    background-color: var(--bg-panel);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.iframe-container iframe {
    width: 100%;
    height: 800px;
    border: 0;
    background-color: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Gallery (Daily Logs)
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-card {
    background-color: var(--bg-item);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.gallery-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
}

.gallery-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-panel);
}
.gallery-date { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.gallery-tag { font-size: 12px; color: var(--text-secondary); background-color: var(--border-color); padding: 4px 8px; border-radius: 4px; }

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: var(--bg-main);
}
.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-img { transform: scale(1.05); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-card:hover .gallery-overlay { background-color: rgba(0, 0, 0, 0.2); }

.gallery-hint {
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 14px;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gallery-card:hover .gallery-hint { opacity: 1; }

.gallery-desc {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    align-items: center;
}
.gallery-desc p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
}
.status-indicator {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.status-dot { width: 8px; height: 8px; background-color: var(--accent-green); border-radius: 50%; display: inline-block; }
.footer-copy { margin-top: 16px; opacity: 0.6; line-height: 1.8; }

/* ==========================================================================
   Floating Action Button (WeChat)
   ========================================================================== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--wechat-green);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.fab:hover { transform: scale(1.05); background-color: #06ad56; }
.fab svg { width: 24px; height: 24px; }

/* ==========================================================================
   Modals (WeChat & Lightbox)
   ========================================================================== */
.modal-overlay, .lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay { background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.lightbox-overlay { background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(4px); z-index: 60; }

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 384px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}
.modal-header h3 { color: #111827; font-size: 18px; font-weight: 500; }
.close-btn { color: #9ca3af; padding: 4px; transition: color 0.2s; }
.close-btn:hover { color: #4b5563; }
.close-btn svg { width: 20px; height: 20px; }

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-container {
    width: 192px;
    height: 192px;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.qr-image { width: 100%; height: 100%; object-fit: contain; }
.qr-placeholder { display: flex; flex-direction: column; align-items: center; color: var(--wechat-green); opacity: 0.8; }
.qr-placeholder svg { width: 64px; height: 64px; margin-bottom: 8px; }

.wechat-id-box {
    background-color: #f9fafb;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
    width: 100%;
    text-align: center;
}
.wechat-id-box p { color: #111827; font-weight: 500; }
.wechat-id { user-select: all; color: var(--wechat-green); font-weight: 700; letter-spacing: 1px; }

/* Lightbox Specifics */
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.2s;
}
.lightbox-close:hover { color: white; background-color: rgba(0, 0, 0, 0.8); }
.lightbox-close svg { width: 32px; height: 32px; }

.lightbox-content {
    position: relative;
    max-width: 1152px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Contact Panel
   ========================================================================== */
.contact-panel {
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(7, 193, 96, 0.2);
}

.contact-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}
@media (min-width: 640px) {
    .contact-grid {
        flex-direction: row;
        text-align: left;
    }
}

.contact-qr {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contact-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.wechat-id-display {
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    color: var(--wechat-green);
    background-color: rgba(7, 193, 96, 0.1);
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid rgba(7, 193, 96, 0.3);
    letter-spacing: 1px;
    user-select: all;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.fade-in { animation: fadeIn 0.3s ease-out forwards; }
.zoom-in { animation: zoomIn 0.2s ease-out forwards; }
