:root {
    --primary: #ff6b8a;
    --primary-light: #ff9a9e;
    --primary-dark: #e55a7b;
    --primary-grad: linear-gradient(135deg, #ff6b8a 0%, #ff8e9e 50%, #fecfef 100%);
    --accent: #c471ed;
    --accent-grad: linear-gradient(135deg, #c471ed 0%, #fa71cd 100%);
    --bg-color: #fef6f8;
    --bg-grad: linear-gradient(180deg, #fef6f8 0%, #fff5f7 30%, #fdf2f8 100%);
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-bg-solid: #ffffff;
    --text-main: #2d2033;
    --text-light: #7a6b82;
    --text-muted: #b8a9bf;
    --shadow: 0 8px 32px rgba(180, 100, 140, 0.08);
    --shadow-hover: 0 16px 48px rgba(180, 100, 140, 0.14);
    --shadow-glow: 0 0 40px rgba(255, 107, 138, 0.15);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-grad);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 粒子爱心背景容器 */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 页面加载遮罩 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-heart {
    font-size: 3rem;
    color: var(--primary);
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* 统一按钮样式 */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
    top: calc(50% - 100px);
    left: calc(50% - 100px);
}

.btn-primary {
    background: var(--primary-grad);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 138, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 107, 138, 0.5);
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: rgba(255,255,255,0.8);
    color: var(--text-main);
    border: 2px solid rgba(200, 160, 180, 0.2);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary-light);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* 统一输入框样式 */
input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(200, 160, 180, 0.15);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    font-family: inherit;
    color: var(--text-main);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.1), var(--shadow-glow);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

/* 统一卡片样式 */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* 统一表单组样式 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 统一标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
}

/* 统一链接样式 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* 灯箱覆盖层 */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* 音乐播放器 */
.music-player {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 200;
}

.music-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    transition: var(--transition);
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.music-toggle.playing {
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(255,107,138,0.2); }
    50% { box-shadow: var(--shadow), 0 0 0 8px rgba(255,107,138,0); }
}

.music-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 280px;
    background: var(--card-bg-solid);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(255,255,255,0.3);
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.music-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.music-panel h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 500;
}

.music-panel input[type="text"] {
    margin-bottom: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.music-panel .music-controls {
    display: flex;
    gap: 8px;
}

.music-panel .music-controls .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* 提示通知 */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success { background: linear-gradient(135deg, #00b894, #00cec9); }
.toast.error { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.toast.info { background: var(--primary-grad); }

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* 滚动显示动画 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 138, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 138, 0.4);
}

/* 选中文本颜色 */
::selection {
    background: rgba(255, 107, 138, 0.2);
    color: var(--text-main);
}
