/**
 * 情侣纪念日H5 - 主样式文件
 * Created by Jason on 2026/01/12
 */

/* ==================== 全局样式 ==================== */

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

:root {
    /* 颜色变量 */
    --primary-color: #FF6B9D;
    --secondary-color: #C23ECE;
    --accent-color: #E6B8A2;
    --bg-light: #FFF0F5;
    --bg-white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --heart-color: #FF1744;
    --shadow-light: rgba(194, 62, 206, 0.1);
    --shadow-medium: rgba(194, 62, 206, 0.2);
    --shadow-heavy: rgba(194, 62, 206, 0.3);

    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 背景爱心动画 ==================== */

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* ==================== 主容器 ==================== */

.main-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-bottom: 80px;
    min-height: 100vh;
    z-index: 1;
}

/* ==================== 头部 ==================== */

.header {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.title {
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.couple-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 18px;
    color: var(--text-light);
}

.heart-symbol {
    font-size: 20px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* ==================== 主天数卡片 ==================== */

.main-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 8px 24px var(--shadow-medium);
    color: white;
}

.days-together {
    text-align: center;
}

.days-together .label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.days-number {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    margin: var(--spacing-md) 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.days-together .unit {
    font-size: 18px;
    margin-top: var(--spacing-sm);
    opacity: 0.9;
}

.start-date {
    font-size: 14px;
    opacity: 0.8;
    margin-top: var(--spacing-md);
}

/* ==================== 重要日子区域 ==================== */

.important-days-section {
    margin-bottom: var(--spacing-lg);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    font-size: 20px;
    color: var(--text-dark);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease;
}

.icon-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn.small {
    width: 28px;
    height: 28px;
    font-size: 16px;
}

/* 日子列表 */

.days-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.day-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.day-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.day-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.day-card-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.day-card-actions button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-card-actions button:hover {
    background: var(--primary-color);
    color: white;
}

.day-card-date {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.day-card-days {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

.day-card-description {
    font-size: 14px;
    color: var(--text-lighter);
    margin-top: var(--spacing-xs);
    line-height: 1.5;
}

/* 空状态 */

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-lighter);
}

.empty-state p {
    margin: var(--spacing-xs) 0;
}

/* ==================== 倒计时区域 ==================== */

.countdown-section {
    margin-bottom: var(--spacing-lg);
}

.countdown-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.countdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.countdown-header h3 {
    font-size: 18px;
    color: var(--text-dark);
}

.countdown-display {
    display: flex;
    justify-content: space-around;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.countdown-item {
    flex: 1;
    text-align: center;
}

.countdown-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: var(--spacing-xs);
}

.countdown-date {
    text-align: center;
    font-size: 14px;
    color: var(--text-lighter);
}

.countdown-empty {
    text-align: center;
    padding: var(--spacing-xl);
}

.countdown-empty p {
    color: var(--text-lighter);
    margin-bottom: var(--spacing-md);
}

/* ==================== 按钮样式 ==================== */

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--bg-white);
}

/* ==================== 悬浮按钮 ==================== */

.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 32px;
    box-shadow: 0 6px 20px var(--shadow-heavy);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 24px var(--shadow-heavy);
}

.fab:active {
    transform: scale(0.95) rotate(90deg);
}

/* ==================== 弹窗样式 ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.modal-header h2 {
    font-size: 20px;
    color: var(--text-dark);
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 欢迎弹窗 */

.welcome-modal {
    text-align: center;
}

.welcome-modal h2 {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
}

.welcome-modal > p {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

/* ==================== 表单样式 ==================== */

.form-group {
    margin-bottom: var(--spacing-md);
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--bg-light);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow-light);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.form-actions button {
    flex: 1;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 480px) {
    .title {
        font-size: 24px;
    }

    .days-number {
        font-size: 52px;
    }

    .countdown-value {
        font-size: 28px;
    }

    .fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 28px;
    }
}

/* ==================== 工具类 ==================== */

.hidden {
    display: none !important;
}

.show {
    display: flex !important;
}
