/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --bg-color: #0a0e27;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
}

body.light-mode {
    --bg-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.95);
}

body.light-mode .main-title,
body.light-mode .section-title,
body.light-mode .time-number,
body.light-mode .stat-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-menu a,
body.light-mode .control-btn,
body.light-mode .lang-select {
    color: #333;
}

body.light-mode .time-box,
body.light-mode .wish-card,
body.light-mode .event-card,
body.light-mode .poll-card,
body.light-mode .wish-form,
body.light-mode .blessing-form {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.2);
    color: #333;
}

body.light-mode .time-label,
body.light-mode .wish-content,
body.light-mode .event-info,
body.light-mode .subtitle,
body.light-mode .section-desc,
body.light-mode .stat-label {
    color: #555;
}

body.light-mode textarea,
body.light-mode input,
body.light-mode select {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-color: rgba(102, 126, 234, 0.3);
}

body.light-mode .snowflake {
    color: rgba(255, 255, 255, 0.8);
}

/* 背景效果 */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1em;
    animation: fall linear infinite;
    opacity: 0.8;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.control-btn {
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.control-btn:hover {
    transform: scale(1.1);
}

.lang-select {
    background: var(--card-bg);
    border: none;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
}

/* 主页倒计时 */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 50px;
    text-align: center;
}

.countdown-container {
    margin-bottom: 3rem;
}

.main-title {
    font-size: 4rem;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.countdown {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.time-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem 3rem;
    min-width: 150px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.time-box:hover {
    transform: translateY(-10px);
}

.time-number {
    display: block;
    font-size: 4rem;
    font-weight: bold;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.celebrate-btn {
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.celebrate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 统计数据 */
.stats-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* 通用区块样式 */
.section {
    padding: 100px 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 3rem;
}

/* 心愿墙 */
.wish-form,
.blessing-form {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.wish-form textarea,
.blessing-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.form-select,
.form-input {
    padding: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
}

.form-input {
    flex: 1;
    min-width: 150px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.submit-btn {
    padding: 0.8rem 2rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.3s;
}

.submit-btn:hover {
    transform: scale(1.05);
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--gradient-1);
    border-color: var(--primary-color);
}

.wishes-grid,
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.wish-card,
.event-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.wish-card:hover,
.event-card:hover {
    transform: translateY(-5px);
}

.wish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.wish-category {
    padding: 0.3rem 0.8rem;
    background: var(--gradient-2);
    border-radius: 20px;
    font-size: 0.85rem;
}

.wish-nickname {
    opacity: 0.7;
    font-size: 0.9rem;
}

.wish-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.wish-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.3s;
}

.like-btn:hover {
    color: var(--primary-color);
}

.wish-time {
    margin-left: auto;
    opacity: 0.6;
    font-size: 0.85rem;
}

.load-more-btn {
    display: block;
    margin: 0 auto;
    padding: 1rem 3rem;
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--gradient-1);
}

/* 祝福卡片 */
.blessing-result {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
}

.blessing-card {
    background: white;
    color: #333;
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.blessing-content {
    font-size: 1.3rem;
    line-height: 1.8;
}

.share-options {
    text-align: center;
}

.share-input {
    width: 70%;
    padding: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    margin: 0.5rem;
}

.copy-btn {
    padding: 0.8rem 2rem;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s;
}

.copy-btn:hover {
    transform: scale(1.05);
}

/* 活动卡片 */
.event-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.event-info {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.event-type {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--gradient-1);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

/* 投票 */
.polls-container {
    display: grid;
    gap: 2rem;
}

.poll-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.poll-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.poll-options {
    display: grid;
    gap: 1rem;
}

.poll-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.poll-option:hover {
    border-color: var(--primary-color);
}

.poll-option-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.2;
    transition: width 0.5s;
}

.poll-option-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: 10% auto;
    padding: 3rem;
    width: 80%;
    max-width: 600px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    text-align: center;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
}

.celebration-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.celebration-text {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* 页脚 */
.footer {
    background: rgba(10, 14, 39, 0.95);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .countdown {
        gap: 1rem;
    }
    
    .time-box {
        padding: 1rem 1.5rem;
        min-width: 100px;
    }
    
    .time-number {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .wishes-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row > * {
        width: 100%;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
