/* ========================================
   时光相册 - 前端样式 (全新设计)
   现代极简相册风格，类似Google Photos / iCloud
   ======================================== */

/* === 变量定义 === */
:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --bg: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-gradient: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    --text: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --header-height: 56px;
    --transition: 0.2s ease;
}

/* === 基础重置 === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-secondary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, video { display: block; max-width: 100%; }

/* ========================================
   Header - 顶部导航
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.site-logo svg {
    width: 20px;
    height: 20px;
}

.site-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.site-subtitle {
    display: none;
}

/* Tab 切换器 - 胶囊样式 */
.tab-switcher {
    display: flex;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-full);
    gap: 2px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    background: var(--bg);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* 日期按钮 */
.date-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.date-btn svg {
    width: 18px;
    height: 18px;
}

.date-btn:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.date-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ========================================
   主内容区
   ======================================== */
.main {
    padding-top: var(--header-height);
    min-height: calc(100vh - 60px);
}

/* ========================================
   日期选择器 - 横向滚动胶囊
   ======================================== */
.calendar-container {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
    position: relative;
}

.calendar-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.calendar-nav {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition);
}

.calendar-nav:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.calendar-nav svg {
    width: 18px;
    height: 18px;
}

.date-scroll {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.date-scroll::-webkit-scrollbar {
    display: none;
}

.date-item {
    flex-shrink: 0;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.date-item .day {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-item .num {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-top: 2px;
}

.date-item:hover:not(.empty) {
    border-color: var(--primary-light);
    background: var(--bg);
}

.date-item.active {
    background: var(--primary);
    border-color: var(--primary);
}

.date-item.active .day,
.date-item.active .num {
    color: white;
}

.date-item.empty {
    opacity: 0.4;
    cursor: default;
}


/* ========================================
   空状态 - 精美欢迎页（重点！）
   ======================================== */
.empty-state {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #FFFFFF 0%, #F0F4FF 40%, #EEF2FF 70%, #E8ECFF 100%);
}

.empty-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 200px; height: 200px;
    background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(129,140,248,0.06));
    top: -60px; right: -40px;
}

.shape-2 {
    width: 160px; height: 160px;
    background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(196,181,253,0.05));
    bottom: 10%; left: -40px;
    animation-delay: -2s;
}

.shape-3 {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(99,102,241,0.04));
    top: 30%; right: 10%;
    animation-delay: -4s;
}

.shape-4 {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, rgba(244,114,182,0.06), rgba(251,146,60,0.04));
    bottom: 25%; right: 25%;
    animation-delay: -6s;
}

.shape-5 {
    width: 120px; height: 120px;
    background: linear-gradient(135deg, rgba(52,211,153,0.06), rgba(59,130,246,0.04));
    top: 15%; left: 15%;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.empty-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
}

/* 插画 - 风景画框 */
.empty-illustration {
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease;
}

.empty-frame {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 24px;
    background: linear-gradient(135deg, #C7D2FE 0%, #A5B4FC 30%, #818CF8 100%);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(79, 70, 229, 0.2),
        0 2px 8px rgba(79, 70, 229, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.frame-mountain {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, #6366F1 0%, #4F46E5 100%);
    clip-path: polygon(0 100%, 15% 35%, 30% 60%, 50% 20%, 70% 50%, 85% 30%, 100% 100%);
}

.frame-mountain::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, #4338CA 0%, #3730A3 100%);
    clip-path: polygon(0 100%, 20% 40%, 40% 70%, 60% 45%, 80% 65%, 100% 100%);
}

.frame-sun {
    position: absolute;
    top: 20px;
    right: 28px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FDE68A;
    box-shadow: 0 0 20px rgba(253, 230, 138, 0.6), 0 0 40px rgba(253, 230, 138, 0.3);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(253,230,138,0.6), 0 0 40px rgba(253,230,138,0.3); }
    50% { box-shadow: 0 0 28px rgba(253,230,138,0.8), 0 0 56px rgba(253,230,138,0.4); }
}

.frame-cloud {
    position: absolute;
    top: 30px;
    left: 20px;
    width: 40px;
    height: 14px;
    background: rgba(255,255,255,0.7);
    border-radius: 14px;
    animation: cloudDrift 6s ease-in-out infinite;
}

.frame-cloud::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
}

.frame-cloud::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
}

@keyframes cloudDrift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.empty-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* 上传卡片 - 横向布局 */
.empty-upload-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 24px 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease 0.3s both;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.empty-upload-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.upload-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.empty-upload-card:hover .upload-icon-circle {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary-hover);
}

.upload-icon-circle svg {
    width: 24px;
    height: 24px;
}

.upload-card-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.upload-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.upload-card-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   加载状态
   ======================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   媒体列表
   ======================================== */
.media-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.media-groups {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 日期分组 */
.media-group {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.group-date {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-date-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.group-date-icon svg {
    width: 16px;
    height: 16px;
}

.group-date-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.group-count {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* 网格布局 */
.media-grid {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: all var(--transition);
}

.media-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.media-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* hover 遮罩 */
.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-name {
    font-size: 12px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 视频缩略图容器 */
.video-thumb {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.video-play-overlay svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.media-item:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255,255,255,0.45);
    border-color: rgba(255,255,255,0.7);
}

/* 时长标签 */
.duration-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 7px;
    border-radius: 4px;
}

/* ========================================
   分页
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 24px;
}

.page-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   底部浮动上传按钮
   ======================================== */
.fab-upload {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
    z-index: 90;
}

.fab-upload:hover {
    background: var(--primary-hover);
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.5);
}

.fab-upload:active {
    transform: translateX(-50%) translateY(-2px);
}

.fab-upload svg {
    width: 28px;
    height: 28px;
}

/* ========================================
   弹窗
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 24px;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

/* 上传区域 */
.upload-area {
    margin: 24px;
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-area p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-muted);
}

/* 上传列表 */
.upload-list {
    padding: 0 24px 24px;
}

.upload-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.upload-item-name {
    font-size: 13px;
    color: var(--text);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-item-status {
    font-size: 12px;
    font-weight: 500;
}

.upload-item-status.uploading { color: var(--primary); }
.upload-item-status.success { color: #10B981; }
.upload-item-status.error { color: #EF4444; }

.upload-progress {
    width: 100px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.upload-progress-saving {
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    animation: saving-pulse 1s ease-in-out infinite;
}

@keyframes saving-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ========================================
   查看器 (viewer.css)
   ======================================== */
.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 10;
}

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

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 10;
}

.viewer-nav:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
}

.viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.viewer-prev { left: 20px; }
.viewer-next { right: 20px; }

.viewer-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-content img,
.viewer-content video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.viewer-info {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 16px 24px;
    border-radius: var(--radius);
    text-align: center;
    color: white;
    min-width: 300px;
}

.viewer-filename {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.viewer-meta {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.viewer-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ========================================
   底部
   ======================================== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 12px;
}

.footer a {
    color: var(--text-muted);
    transition: color var(--transition);
}

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

/* ========================================
   响应式
   ======================================== */

/* 手机 */
@media (max-width: 768px) {
    :root {
        --header-height: 52px;
    }

    .header-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .site-brand {
        gap: 8px;
    }

    .site-logo {
        width: 32px;
        height: 32px;
    }

    .site-logo svg {
        width: 16px;
        height: 16px;
    }

    .site-title {
        font-size: 17px;
    }

    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .tab-btn span {
        display: none;
    }

    .date-btn span {
        display: none;
    }

    .media-container {
        padding: 16px;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .group-header {
        padding: 12px 16px;
    }

    .group-date-text {
        font-size: 14px;
    }

    .empty-state {
        padding: 32px 20px;
    }

    .empty-frame {
        width: 120px;
        height: 120px;
    }

    .empty-title {
        font-size: 22px;
    }

    .empty-desc {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .empty-upload-card {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
        gap: 14px;
    }

    .upload-card-text {
        align-items: center;
    }

    .fab-upload {
        bottom: 24px;
        width: 56px;
        height: 56px;
    }

    .fab-upload svg {
        width: 24px;
        height: 24px;
    }

    .viewer-info {
        min-width: auto;
        width: calc(100% - 40px);
        padding: 12px 16px;
    }

    .viewer-filename {
        font-size: 14px;
    }

    .viewer-meta {
        font-size: 12px;
    }

    .calendar-header {
        padding: 0 16px;
    }

    .date-scroll {
        padding: 0 16px;
    }

    .date-item {
        padding: 8px 14px;
    }

    .date-item .num {
        font-size: 16px;
    }

    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
}

/* 小屏手机 */
@media (max-width: 380px) {
    .media-grid {
        gap: 6px;
    }

    .tab-btn svg {
        width: 18px;
        height: 18px;
    }

    .date-btn {
        padding: 8px 10px;
    }

    .date-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   按钮样式
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   访问密码弹窗
   ======================================== */
.password-modal-content {
    max-width: 360px;
    text-align: center;
    padding: 40px 32px;
    border-radius: var(--radius-lg);
}

.password-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-modal-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.password-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.password-modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

#password-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#password-form input {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    text-align: center;
    transition: all var(--transition);
}

#password-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.password-submit-btn {
    width: 100%;
    justify-content: center;
}

.password-error {
    color: var(--danger, #e53935);
    font-size: 13px;
    margin-top: 12px;
}
