﻿@charset "UTF-8";

/* ============================================================
   time.css — 时光流影页面样式
   ============================================================ */

/* ---------- 字体引入 ---------- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

/* ---------- CSS 变量 ---------- */
:root {
    --color-rose:        #f43f5e;
    --color-rose-light:  #fda4af;
    --color-rose-pale:   #fff1f2;
    --color-orange:      #fb923c;
    --color-pink:        #ec4899;

    --color-text-primary:   #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-muted:     #9ca3af;

    --color-card-bg:    rgba(255, 255, 255, 0.82);
    --color-card-border: rgba(255, 255, 255, 0.65);

    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --font-sans: 'Noto Sans SC', sans-serif;

    --radius-card: 1.5rem;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.10);

    --transition-card: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 页面布局 ---------- */
.time-page-wrapper {
    font-family: var(--font-sans);
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

@media (min-width: 640px) {
    .time-page-wrapper { padding: 3.5rem 1.5rem 5rem; }
}

@media (min-width: 1024px) {
    .time-page-wrapper { padding: 5rem 2rem 6rem; }
}

/* ---------- 页头 ---------- */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.9));
    margin: 0;
}

@media (min-width: 640px) {
    .page-title { font-size: 2rem; }
}

.title-icon {
    width: 1.8rem;
    height: 1.8rem;
    color: var(--color-rose);
    flex-shrink: 0;
}

.page-subtitle {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ---------- 卡片网格 ---------- */
.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* ---------- 卡片基础 ---------- */
.card {
    background: var(--color-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition-card);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* ---------- 时钟卡片 ---------- */
.card--clock {
    /* 移动端占满一列，桌面端占两列 */
    grid-column: span 1;
}

@media (min-width: 640px) {
    .card--clock { grid-column: span 2; }
}

@media (min-width: 1024px) {
    .card--clock { grid-column: span 2; }
}

.card-deco {
    position: absolute;
    right: -2.5rem;
    top: -2.5rem;
    width: 10rem;
    height: 10rem;
    background: radial-gradient(circle at center, #fce7f3, #ffe4e6);
    border-radius: 50%;
    filter: blur(32px);
    opacity: 0.5;
    pointer-events: none;
    transition: transform 0.7s ease;
}

.card--clock:hover .card-deco { transform: scale(1.15); }

.clock-content {
    position: relative;
    z-index: 1;
}

.clock-date {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-rose);
    margin-bottom: 0.5rem;
}

.clock-time {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.clock-meta {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.clock-meta-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.clock-meta-highlight {
    color: var(--color-rose);
    font-weight: 700;
    padding: 0 0.15rem;
}

/* ---------- Uptime 卡片 ---------- */
.card--uptime {
    background: linear-gradient(135deg, #fb7185, #f43f5e, #ec4899);
    color: white;
    border: none;
    box-shadow: 0 8px 32px rgba(244, 63, 94, 0.3);
}

.card--uptime:hover {
    box-shadow: 0 12px 40px rgba(244, 63, 94, 0.4);
    transform: translateY(-3px);
}

.uptime-bg-icon {
    position: absolute;
    right: -0.5rem;
    bottom: -0.5rem;
    width: 7rem;
    height: 7rem;
    opacity: 0.10;
    pointer-events: none;
}

.uptime-content {
    position: relative;
    z-index: 1;
}

.uptime-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.uptime-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #86efac;
    border: 1px solid white;
    animation: pulse-dot 2s ease-in-out infinite;
}

.uptime-days-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.uptime-days {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
}

.uptime-days-unit {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.uptime-hms {
    font-family: var(--font-mono);
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 0.75rem;
    letter-spacing: 0.02em;
}

/* ---------- 年度进度卡片 ---------- */
.card--year {
    grid-column: span 1;
}

@media (min-width: 640px) {
    .card--year { grid-column: span 2; }
}

@media (min-width: 1024px) {
    .card--year { grid-column: span 3; }
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.year-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.year-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--color-orange);
    flex-shrink: 0;
}

.year-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0;
}

.year-percent {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-rose);
    white-space: nowrap;
}

/* ---------- Mini 进度卡片 ---------- */
.card--mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.mini-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.mini-label-sub {
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.mini-percent {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
}

.mini-percent--day  { color: var(--color-orange); }
.mini-percent--week { color: var(--color-rose); }
.mini-percent--life { color: var(--color-pink); }

.mini-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0.75rem 0 0;
    text-align: center;
}

/* ---------- 进度条 ---------- */
.progress-track {
    width: 100%;
    height: 0.5rem;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card--year .progress-track { height: 0.75rem; }

.progress-fill {
    height: 100%;
    width: 0;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill--year {
    background: linear-gradient(90deg, #fbbf24, #fb923c, #f43f5e, #ec4899);
}

.progress-fill--day  { background: linear-gradient(90deg, #fdba74, #fb923c); }
.progress-fill--week { background: linear-gradient(90deg, #fda4af, #f43f5e); }
.progress-fill--life { background: linear-gradient(90deg, #f9a8d4, #ec4899); }

/* ---------- 进度条扫光 ---------- */
.progress-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.45) 50%,
        rgba(255,255,255,0) 100%
    );
    animation: shine 2.4s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ---------- 呼吸灯 ---------- */
@keyframes pulse-dot {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    .progress-shine { animation: none; }
    .uptime-dot     { animation: none; }
    .card,
    .card--uptime   { transition: none; }
    .progress-fill  { transition: none; }
}