* { margin: 0; padding: 0; box-sizing: border-box; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }

:root {
    --theme-color: #ff758c;
    --accent-color: #ffb7c5;
    --bg-color1: #ffdde1;
    --bg-color2: #ee9ca7;
    --bg-color3: #ffc0cb;
    --bg-color4: #f8bbd0;
    --glass-opacity: 0.25;
    --glass-blur: 14px;
}

html, body { min-height: 100vh; overflow-x: hidden; }

body {
    background: linear-gradient(-45deg, var(--bg-color1), var(--bg-color2), var(--bg-color3), var(--bg-color4));
    background-size: 400% 400%;
    animation: bgMove 18s ease infinite;
    color: #4a2c2a;
    position: relative;
}

@keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.aurora {
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 30% 30%, var(--accent-color), transparent 40%),
        radial-gradient(circle at 70% 60%, var(--theme-color), transparent 45%);
    opacity: 0.4;
    animation: auroraMove 25s ease-in-out infinite;
    filter: blur(60px);
}
@keyframes auroraMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, -5%) scale(1.1); }
    66% { transform: translate(-5%, 5%) scale(0.95); }
}

.stars {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 40% 70%, #fff, transparent),
        radial-gradient(1px 1px at 60% 20%, #fff, transparent),
        radial-gradient(1px 1px at 80% 50%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 15% 80%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 75% 90%, #fff, transparent);
    background-size: 200px 200px;
    opacity: 0.6;
    animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.3; } to { opacity: 0.8; } }

.glass {
    background: rgba(255, 255, 255, var(--glass-opacity));
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
    position: relative;
    z-index: 1;
}

.avatar-container {
    margin: 0 auto 20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.4);
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.3);
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder { font-size: 44px; }
.avatar-small {
    width: 38px; height: 38px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid #fff;
}
.avatar-small-placeholder {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: #fff; font-size: 18px;
}

.login-page {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; padding: 20px;
}
.login-card { width: 400px; padding: 40px 30px; text-align: center; z-index: 2; }
.login-title {
    font-size: 24px; color: #4a2c2a;
    margin-bottom: 8px; font-weight: 800; letter-spacing: 1px;
}
.login-sub { font-size: 14px; color: #6b4c4a; margin-bottom: 28px; }
.field {
    display: flex; align-items: center;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 14px; padding: 0 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: 0.3s;
}
.field:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 117, 140, 0.3);
    background: rgba(255, 255, 255, 0.75);
}
.field-icon { font-size: 16px; margin-right: 8px; }
.field input {
    flex: 1; border: none; outline: none;
    background: transparent; padding: 14px 0;
    font-size: 15px; color: #4a2c2a;
}
.field input::placeholder { color: #9e7c7a; }

.btn-primary {
    width: 100%; padding: 14px;
    border: none; border-radius: 14px;
    background: linear-gradient(135deg, var(--theme-color), var(--accent-color));
    color: #fff; font-size: 16px;
    letter-spacing: 4px; cursor: pointer; font-weight: bold;
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.45);
    transition: 0.3s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 117, 140, 0.6);
}
.btn-small {
    width: auto !important;
    padding: 10px 24px !important;
    letter-spacing: 1px !important;
    font-size: 14px !important;
}
.login-tip { margin-top: 20px; font-size: 12px; color: #8c6b69; }
.error-msg { color: #d6336c; margin-top: 12px; font-size: 14px; font-weight: bold; }

.clock-container {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #4a2c2a;
    z-index: 100;
    letter-spacing: 0.5px;
}

.top-bar {
    position: fixed; top: 20px; left: 20px;
    padding: 10px 18px;
    display: flex; align-items: center; gap: 20px;
    z-index: 100; border-radius: 16px;
}
.top-left { display: flex; align-items: center; gap: 10px; }
.site-name { font-weight: 700; color: #4a2c2a; font-size: 14px; }
.top-right { display: flex; gap: 8px; }

.timeline-page { overflow: hidden; height: 100vh; }
.timeline-wrapper {
    position: relative; width: 100%; height: 100vh;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; z-index: 2;
}
.timeline-wrapper::-webkit-scrollbar { display: none; }

.timeline-track {
    display: flex; align-items: stretch;
    height: 100%; position: relative;
    min-width: max-content; padding: 0 200px;
}
.timeline-track::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--theme-color), var(--accent-color), var(--theme-color), transparent);
    transform: translateY(-50%);
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(255, 117, 140, 0.6);
    z-index: 0;
}

.timeline-event {
    flex: 0 0 340px; position: relative;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 20px 0;
}

.event-dot {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 22px; height: 22px; border-radius: 50%;
    background: #fff; border: 4px solid var(--theme-color);
    box-shadow: 0 0 20px var(--theme-color), 0 0 40px var(--accent-color);
    z-index: 10; animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 20px var(--theme-color), 0 0 40px var(--accent-color); }
    50% { box-shadow: 0 0 30px var(--theme-color), 0 0 60px var(--accent-color); }
}

.event-card {
    position: absolute; left: 50%;
    transform: translateX(-50%);
    width: 300px; padding: 18px 20px;
    border-radius: 18px; text-align: left;
    z-index: 5; transition: 0.3s;
}
.event-card:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.4);
}
.timeline-event.event-top .event-card { bottom: 50%; margin-bottom: 40px; }
.timeline-event.event-bottom .event-card { top: 50%; margin-top: 40px; }

.event-date { font-size: 12px; color: #8c6b69; margin-bottom: 6px; letter-spacing: 1px; }
.event-title { font-size: 16px; font-weight: 700; color: #4a2c2a; margin-bottom: 6px; }
.event-desc { font-size: 13px; color: #6b4c4a; line-height: 1.6; margin-bottom: 10px; }

.event-images { display: flex; align-items: center; margin-top: 10px; padding-left: 4px; }
.event-img {
    border-radius: 10px; object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
    transition: 0.3s; cursor: pointer; flex-shrink: 0;
}
.event-img:not(:first-child) { margin-left: calc(-1 * var(--overlap, 30px)); }
.event-img:hover {
    transform: translateY(-8px) scale(1.15);
    z-index: 100 !important;
    box-shadow: 0 8px 24px rgba(255, 105, 180, 0.6);
}

.empty-tip {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    color: #6b4c4a; font-size: 16px; z-index: 3;
}

.admin-float {
    position: fixed; left: 20px; bottom: 20px;
    z-index: 1000;
    display: flex; flex-direction: column;
    align-items: flex-start; gap: 10px;
}
.admin-float-toggle {
    width: 50px; height: 50px;
    border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--theme-color), var(--accent-color));
    color: #fff; font-size: 22px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.5);
    transition: 0.3s;
}
.admin-float-toggle:hover { transform: scale(1.1) rotate(30deg); }
.admin-float-panel { padding: 18px; width: 240px; display: none; border-radius: 16px; }
.admin-float.open .admin-float-panel { display: block; animation: slideUp 0.3s ease; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.admin-float-panel h4 { margin-bottom: 12px; color: #4a2c2a; font-size: 14px; }
.admin-float-panel input {
    width: 100%; padding: 10px 12px;
    margin-bottom: 10px; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.6);
    color: #4a2c2a; font-size: 13px; outline: none;
}

.admin-page { padding: 30px 20px; min-height: 100vh; }
.admin-container { max-width: 800px; margin: 0 auto; position: relative; z-index: 2; }
.admin-header {
    padding: 20px 24px; margin-bottom: 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.admin-header h1 { font-size: 20px; color: #4a2c2a; }

.form-card { padding: 22px; margin-bottom: 20px; }
.form-card h3 { margin-bottom: 16px; color: #4a2c2a; font-size: 16px; }
.form-card input[type="text"],
.form-card input[type="password"],
.form-card textarea {
    width: 100%; padding: 12px 14px;
    margin-bottom: 12px; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.55);
    color: #4a2c2a; font-size: 14px; outline: none;
}
.form-card input:focus,
.form-card textarea:focus { box-shadow: 0 0 0 3px rgba(255, 117, 140, 0.25); }
.form-card input::placeholder,
.form-card textarea::placeholder { color: #9e7c7a; }
.form-card textarea { min-height: 70px; resize: vertical; }
.form-card label {
    display: block; font-size: 13px; color: #4a2c2a;
    font-weight: 600; margin-bottom: 6px; margin-top: 4px;
}
.form-card input[type="color"] {
    width: 60px; height: 36px;
    border: none; border-radius: 8px; cursor: pointer;
    vertical-align: middle;
}
.form-card input[type="range"] {
    width: 60%; vertical-align: middle;
    margin-right: 10px; accent-color: var(--theme-color);
}
.form-card output { font-size: 14px; color: #6b4c4a; font-weight: bold; }
.form-card input[type="file"] {
    padding: 10px; border-radius: 10px;
    border: 1px dashed rgba(255, 117, 140, 0.5);
    background: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px; width: 100%; color: #4a2c2a;
}

.event-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.event-row .info { flex: 1; }
.event-row .info .t { font-size: 14px; font-weight: 700; color: #4a2c2a; }
.event-row .info .d { font-size: 12px; color: #8c6b69; margin-top: 2px; }
.thumb-row { display: flex; gap: 4px; margin-top: 6px; }
.thumb {
    width: 36px; height: 36px; border-radius: 6px;
    object-fit: cover; border: 1px solid #fff;
}

.btn-sm {
    padding: 8px 16px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    color: #4a2c2a; text-decoration: none;
    font-size: 13px; border: 1px solid rgba(255, 255, 255, 0.9);
    transition: 0.3s; cursor: pointer; font-weight: 600;
}
.btn-sm:hover { background: rgba(255, 255, 255, 0.95); transform: translateY(-1px); }
.btn-danger {
    padding: 6px 14px; border-radius: 10px;
    background: linear-gradient(135deg, #ff5066, #d6336c);
    color: #fff; text-decoration: none; font-size: 12px;
    border: none; cursor: pointer; font-weight: 600;
    transition: 0.3s;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(214, 51, 108, 0.4); }



/* ============ 背景图片层 ============ */
.bg-img-layer {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 2s ease-in-out;
    z-index: -1;
    pointer-events: none;
}

/* ============ 左下角悬浮窗内的背景切换按钮 ============ */
.bg-switch-btn {
    width: 100%; padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.9);
    color: #4a2c2a; font-weight: 600;
    font-size: 13px; cursor: pointer;
    transition: 0.3s;
}
.bg-switch-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,117,140,0.3);
}