/* CSS Variables - 等效官网配色 */
:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #00a8e8;
    --text-dark: #1a1a2e;
    --text-light: #666666;
    --text-light2: #999999;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-color: #e6e9ed;
    --shadow-light: 0 2px 12px rgba(0, 102, 204, 0.08);
    --shadow-medium: 0 4px 20px rgba(0, 102, 204, 0.12);
    --shadow-hover: 0 8px 30px rgba(0, 102, 204, 0.18);
    --transition-default: all 0.3s ease;
    --max-width: 1200px;
    
    --color-primary: #0066cc;       /* 主色调 */
    --color-secondary: #00a8e8;     /* 次色调 */
    --color-accent: #C9A227;        /* 金色 */
    --color-bg: #f5f7fa;            /* 背景 */
    --color-bg-dark: #E8E0D0;       /* 深米色 */
    --color-text: #1a1a2e;          /* 深色文字 */
    --color-text-light: #666666;    /* 浅色文字 */
    --color-text-dark: #1a1a2e;     /* 深色背景（用于页脚） */
    --color-card: #FFFFFF;          /* 白色卡片 */
    --color-border: #e6e9ed;        /* 边框色 */
    --color-success: #2D5A27;       /* 绿色-节日 */
    --color-holiday: #8B2323;       /* 红色-节假日 */
    
    --font-display: "STSong", "SimSun", serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "Courier New", monospace;
    
    --shadow-sm: 0 2px 8px rgba(0, 102, 204, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 102, 204, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 102, 204, 0.16);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    transition: var(--transition-default);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-medium);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    font-size: 15px;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
    transition: var(--transition-default);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.contact-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
}

.nav-menu a.contact-btn::after {
    display: none;
}

.nav-menu a.contact-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition-default);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(139, 35, 35, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 58, 95, 0.03) 0%, transparent 50%),
        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='%23D4C4A8' fill-opacity='0.08'%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;
    z-index: -1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.title-icon {
    font-size: 2rem;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.subtitle {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* Mode Switch */
.mode-switch {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.mode-btn {
    padding: 12px 32px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-btn:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mode-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.mode-icon {
    font-size: 1.2rem;
}

/* Input Section */
.input-section {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.input-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 28px 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 400px;
    display: none;
}

.input-card.active {
    display: block;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

/* Date Selectors */
.date-selectors {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.selector-group {
    flex: 1;
    text-align: center;
}

.selector-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
}

.selector-group select {
    width: 100%;
    padding: 10px 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.3s;
}

.selector-group select:hover,
.selector-group select:focus {
    border-color: var(--color-accent);
    outline: none;
}

/* Leap Month Checkbox */
.leap-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.leap-checkbox input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.leap-checkbox input:checked + .checkmark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.leap-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

/* Result Section */
.result-section {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

.result-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.result-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--color-primary), #A52A2A);
    border-color: var(--color-primary);
}

.result-card.highlight .result-label,
.result-card.highlight .result-value {
    color: white;
}

.result-card.holiday {
    background: linear-gradient(135deg, var(--color-holiday), #6B1A1A);
    border-color: var(--color-holiday);
}

.result-card.holiday .result-label,
.result-card.holiday .result-value {
    color: white;
}

.result-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.result-value.zodiac {
    font-size: 1.5rem;
}

/* Main Date Card */
.main-date-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--color-secondary), #2A4A6F);
    border: none;
    text-align: center;
    padding: 28px;
}

.main-date-card .result-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.main-date-card .result-value {
    color: white;
    font-size: 1.75rem;
    font-family: var(--font-display);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: #ffffff;
    padding: 40px 0 30px;
}

.footer-inner {
    text-align: center;
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-wechat {
    margin-bottom: 20px;
}

.footer-wechat img {
    border-radius: 8px;
    margin-bottom: 8px;
}

.footer-wechat p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.footer-beian {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .title-icon {
        font-size: 1.5rem;
    }
    
    .mode-switch {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .input-card {
        padding: 20px;
    }
    
    .date-selectors {
        flex-wrap: wrap;
    }
    
    .selector-group {
        min-width: calc(33.33% - 8px);
    }
    
    .result-section {
        padding: 20px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    /* 导航栏响应式 */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-medium);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 5px 0;
    }
    
    .nav-menu a {
        padding: 10px 0;
    }
    
    .contact-btn {
        display: inline-block;
        text-align: center;
    }
    
    /* Footer Responsive */
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    animation: fadeIn 0.4s ease-out;
}

.result-card:nth-child(2) { animation-delay: 0.05s; }
.result-card:nth-child(3) { animation-delay: 0.1s; }
.result-card:nth-child(4) { animation-delay: 0.15s; }
.result-card:nth-child(5) { animation-delay: 0.2s; }
.result-card:nth-child(6) { animation-delay: 0.25s; }
.result-card:nth-child(7) { animation-delay: 0.3s; }
.result-card:nth-child(8) { animation-delay: 0.35s; }