/* 翁法罗斯天文钟 - Omphalos Clock CSS */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@300;400;700&display=swap');

:root {
    --bg-dark: #12151b;
    --gold: #b8860b;
    --gold-bright: #e5b93d;
    --silver: #a0a8b0;
    --silver-bright: #d0d8e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at center, #1b202c 0%, #0d1015 100%);
    font-family: 'Noto Serif SC', 'EB Garamond', serif;
    color: var(--silver-bright);
}

/* ===== ENTRANCE ===== */
.entrance-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: entranceFadeOut 2s 6s forwards;
}

@keyframes entranceFadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.entrance-svg {
    width: 50vw;
    max-width: 450px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(229, 185, 61, 0.2));
}

.anim-draw {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawComplex 4.5s ease-in-out forwards;
}

@keyframes drawComplex {
    to {
        stroke-dashoffset: 0;
    }
}

.entrance-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    color: var(--gold-bright);
    letter-spacing: 8px;
    opacity: 0;
    animation: fadeUpGold 2s 3s forwards;
    text-shadow: 0 0 20px rgba(229, 185, 61, 0.4);
}

.entrance-sub {
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    color: var(--silver);
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeUpGold 1.5s 4s forwards;
    margin-top: 10px;
}

@keyframes fadeUpGold {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MAIN ===== */
.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    animation: mainFadeIn 1.5s 7s forwards;
    display: flex;
    flex-direction: column;
}

@keyframes mainFadeIn {
    to {
        opacity: 1;
    }
}

.back-link {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 100;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    color: var(--silver);
    text-decoration: none;
    border: 1px solid rgba(160, 168, 176, 0.3);
    padding: 6px 14px;
    border-radius: 2px;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.2);
}

.back-link:hover {
    background: rgba(229, 185, 61, 0.1);
    border-color: var(--gold-bright);
    color: var(--gold-bright);
}

.clock-layout {
    flex: 1;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* Clock */
.clock-center {
    width: 55%;
    max-width: 750px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.clock-wrapper {
    width: 92%;
    aspect-ratio: 1;
    position: relative;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.8));
    border-radius: 50%;
}

.clock-svg {
    width: 100%;
    height: 100%;
}

.titan-wedge {
    transition: fill 0.3s;
    cursor: pointer;
}

.titan-wedge:hover {
    fill: rgba(229, 185, 61, 0.15) !important;
}

.titan-wedge.active {
    fill: rgba(229, 185, 61, 0.25) !important;
}

.wedge-text {
    transition: fill 0.3s;
    pointer-events: none;
}

.clock-hand-anim {
    transition: transform 0.2s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

/* ===== RIGHT PANEL: OMPHALOS CALENDAR ===== */
.panel-right {
    width: 38%;
    max-width: 420px;
    height: 90%;
    margin-right: 3%;
    background: radial-gradient(ellipse at center, rgba(25, 30, 40, 0.92) 0%, rgba(12, 15, 20, 0.96) 100%);
    border: 1px solid rgba(229, 185, 61, 0.2);
    border-radius: 6px;
    box-shadow: -10px 0 60px rgba(0, 0, 0, 0.6);
    padding: 24px 28px;
    color: var(--silver-bright);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.panel-right::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 6px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="none"/><circle cx="2" cy="2" r="0.5" fill="rgba(255,255,255,0.03)"/></svg>');
}

/* Calendar Header */
.cal-header {
    text-align: center;
    margin-bottom: 14px;
}

.cal-season {
    display: inline-block;
    padding: 3px 16px;
    border-radius: 3px;
    font-size: 0.85rem;
    letter-spacing: 4px;
    margin-bottom: 6px;
    background: rgba(206, 147, 216, 0.15);
    color: #ce93d8;
    border: 1px solid rgba(206, 147, 216, 0.3);
}

.cal-month-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin: 6px 0 4px 0;
    text-shadow: 0 0 15px rgba(229, 185, 61, 0.4);
    letter-spacing: 6px;
}

.cal-titan {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    color: var(--silver);
    letter-spacing: 2px;
}

/* Time Row */
.cal-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(229, 185, 61, 0.15);
}

.cal-time-label {
    font-size: 0.85rem;
    color: var(--gold);
    letter-spacing: 2px;
}

.cal-time-val {
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 8px currentColor;
}

.cal-real-time {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #70809a;
}

/* Calendar Grid */
.cal-grid {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    text-align: center;
}

.cal-weekday {
    font-size: 0.78rem;
    color: var(--gold);
    padding: 4px 0;
    letter-spacing: 1px;
    font-weight: bold;
    border-bottom: 1px solid rgba(229, 185, 61, 0.2);
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-family: 'Cinzel', serif;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: #8898a8;
    transition: all 0.3s;
    cursor: default;
    position: relative;
    border: 1px solid transparent;
}

.cal-day:hover {
    background: rgba(229, 185, 61, 0.08);
    border-color: rgba(229, 185, 61, 0.3);
}

.cal-day.today {
    background: rgba(229, 185, 61, 0.2) !important;
    border: 2px solid var(--gold-bright) !important;
    color: var(--gold-bright) !important;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(229, 185, 61, 0.3), inset 0 0 8px rgba(229, 185, 61, 0.1);
}

.cal-day.rest {
    color: rgba(206, 147, 216, 0.7);
}

/* Description */
.cal-desc {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(160, 168, 176, 0.15);
    font-size: 0.88rem;
    line-height: 1.7;
    color: #90a0b0;
    max-height: 120px;
    overflow-y: auto;
}

.cal-desc::-webkit-scrollbar {
    width: 3px;
}

.cal-desc::-webkit-scrollbar-thumb {
    background: rgba(229, 185, 61, 0.3);
    border-radius: 2px;
}

/* ===== TITAN CARD (actual card image) ===== */
.titan-card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 14px 0 10px 0;
}

.titan-card-img {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 640 / 1110;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(229, 185, 61, 0.15);
    border: 1.5px solid rgba(229, 185, 61, 0.3);
    transition: transform 0.35s, box-shadow 0.35s;
}

.titan-card-img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(229, 185, 61, 0.3);
}

/* ===== ROTATING INNER DIAL ===== */
.inner-dial-rotate {
    transform-origin: 0px 0px;
    animation: dialSpin 120s linear infinite;
}

.inner-dial-rotate-reverse {
    transform-origin: 0px 0px;
    animation: dialSpinReverse 90s linear infinite;
}

@keyframes dialSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes dialSpinReverse {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

.rot-slow {
    animation: dialSpin 30s linear infinite;
}

/* 徽章内的图片需要反向旋转保持正 */
.medallion-img-counter {
    animation: dialSpinReverse 120s linear infinite;
}

/* Sparkles */
.spark {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.8);
    animation: twinkle infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1.5);
    }
}