/* ═══════════════════════════════════════════════════════════════
   PriceBoard TV Display — Quiet Luxury Hotel Lobby Signage
   Target: 1920×1080 TV, fullscreen browser, 16:9
   Aesthetic: Dark stone + thin gold hairlines + restrained elegance
   ═══════════════════════════════════════════════════════════════ */

/* ── Palette ── */
:root {
    --bg-deep:        #1A1A1A;
    --bg-panel:       #242424;
    --bg-panel-hover: #2a2a2a;
    --gold:           #8B7340;
    --gold-bright:    #C9A962;
    --gold-dim:       #6B5A35;
    --text-price:     #FFFFFF;
    --text-room:      #E8E0D0;
    --text-secondary: #9A9590;
    --text-muted:     #6B6560;

    /* Timing */
    --fade-duration:  800ms;
    --burn-in-cycle:  240s;  /* 4 minutes */
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-room);
    font-family: "Noto Serif SC", "PingFang SC", serif;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

/* Stone texture: layered radial gradients simulate polished dark stone */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 120% 80% at 15% 20%, rgba(139,115,64,0.03) 0%, transparent 60%),
        radial-gradient(ellipse 100% 100% at 85% 75%, rgba(139,115,64,0.02) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(255,255,255,0.008) 0%, transparent 70%);
}

/* Subtle noise grain overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* ── Anti Burn-in ── */
@keyframes burn-in-shift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(3px, -2px); }
    50%  { transform: translate(-2px, 3px); }
    75%  { transform: translate(2px, 1px); }
    100% { transform: translate(0, 0); }
}

body > *:not(.corner-ornament):not(#offline-badge) {
    animation: burn-in-shift var(--burn-in-cycle) ease-in-out infinite;
}

/* ── Corner Ornaments — thin gold L-brackets ── */
.corner-ornament {
    position: fixed;
    width: 48px;
    height: 48px;
    z-index: 10;
    pointer-events: none;
}
.corner-ornament::before,
.corner-ornament::after {
    content: "";
    position: absolute;
    background: var(--gold-dim);
}
.corner-tl { top: 24px; left: 24px; }
.corner-tl::before { top: 0; left: 0; width: 1px; height: 48px; }
.corner-tl::after  { top: 0; left: 0; width: 48px; height: 1px; }

.corner-tr { top: 24px; right: 24px; }
.corner-tr::before { top: 0; right: 0; width: 1px; height: 48px; }
.corner-tr::after  { top: 0; right: 0; width: 48px; height: 1px; }

.corner-bl { bottom: 24px; left: 24px; }
.corner-bl::before { bottom: 0; left: 0; width: 1px; height: 48px; }
.corner-bl::after  { bottom: 0; left: 0; width: 48px; height: 1px; }

.corner-br { bottom: 24px; right: 24px; }
.corner-br::before { bottom: 0; right: 0; width: 1px; height: 48px; }
.corner-br::after  { bottom: 0; right: 0; width: 48px; height: 1px; }

/* ── Offline Badge ── */
.offline-badge {
    position: fixed;
    top: 32px;
    right: 80px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(139,115,64,0.15);
    border: 1px solid var(--gold-dim);
    border-radius: 999px;
    font-size: 13px;
    color: var(--gold-bright);
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    transition: opacity 0.4s;
}
.offline-badge.hidden { opacity: 0; pointer-events: none; }
.offline-dot {
    width: 6px; height: 6px;
    background: var(--gold-bright);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* ── TOP BAR ── */
.top-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100px;
    padding: 0 56px;
    border-bottom: 1px solid var(--gold-dim);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hotel-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: brightness(0.95);
}

.hotel-name-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hotel-name-cn {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.25em;
    line-height: 1.2;
}

.hotel-name-en {
    font-family: "Cormorant Garamond", serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    line-height: 1;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

/* ── Weather Info ── */
.weather-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-info.hidden { display: none; }

.weather-icon {
    font-size: 24px;
    line-height: 1;
}

.weather-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.weather-temp {
    font-family: "DM Mono", monospace;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-room);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.weather-condition {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
}

/* ── Clock ── */
.clock-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.clock-time {
    font-family: "DM Mono", monospace;
    font-size: 28px;
    font-weight: 500;
    color: var(--text-room);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.clock-date {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    line-height: 1;
}

/* Divider between top-bar-right items */
.top-bar-divider {
    width: 1px;
    height: 36px;
    background: var(--gold-dim);
    opacity: 0.5;
}

.update-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.update-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.update-value {
    font-family: "DM Mono", monospace;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

/* ── MAIN CONTENT ── */
.main-content {
    position: relative;
    z-index: 1;
    display: flex;
    height: calc(100vh - 100px - 80px - var(--ticker-height, 0px));
}

/* ── Photo Panel (Left 58%) ── */
.photo-panel {
    position: relative;
    width: 58%;
    overflow: hidden;
}

.carousel {
    position: absolute;
    inset: 0;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--fade-duration) ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel);
}

.placeholder-icon {
    font-size: 80px;
    color: var(--text-muted);
    opacity: 0.3;
}

/* Bottom gradient overlay on photo */
.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 48px 32px;
    background: linear-gradient(to top,
        rgba(26,26,26,0.95) 0%,
        rgba(26,26,26,0.7) 40%,
        transparent 100%);
    z-index: 3;
}

.carousel-room-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-room);
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.carousel-room-detail {
    font-family: "Cormorant Garamond", serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Carousel dot indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 48px;
    display: flex;
    gap: 10px;
    z-index: 4;
}

.carousel-dot {
    width: 24px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 1px;
    transition: background 0.4s, width 0.4s;
}

.carousel-dot.active {
    width: 36px;
    background: var(--gold-bright);
}

/* ── Price Panel (Right 42%) ── */
.price-panel {
    width: 42%;
    display: flex;
    flex-direction: column;
    padding: 36px 48px 24px 40px;
    border-left: 1px solid var(--gold-dim);
    background: var(--bg-panel);
    position: relative;
}

/* Subtle vertical gold gradient accent on left edge */
.price-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: -1px;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--gold) 20%,
        var(--gold-bright) 50%,
        var(--gold) 80%,
        transparent 100%
    );
}

.price-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.panel-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.panel-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.panel-title-cn {
    font-size: 18px;
    font-weight: 600;
    color: var(--gold-bright);
    letter-spacing: 0.3em;
}

.panel-title-en {
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.45em;
    text-transform: uppercase;
}

/* ── Price List ── */
.price-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid rgba(139,115,64,0.15);
    transition: background 0.3s;
}

.price-row:last-child {
    border-bottom: none;
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.room-name-cn {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-room);
    letter-spacing: 0.12em;
    line-height: 1.3;
}

.room-bed-type {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.price-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}

.price-currency {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gold-bright);
    line-height: 1;
}

.price-number {
    font-family: "DM Mono", monospace;
    font-size: 36px;
    font-weight: 500;
    color: var(--text-price);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.price-unavailable {
    font-family: "DM Mono", monospace;
    font-size: 28px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* ── BOTTOM BAR ── */
.bottom-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 56px;
    border-top: 1px solid var(--gold-dim);
}

.notices {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.notice-dot {
    color: var(--gold-dim);
}

.qr-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qr-section.hidden {
    display: none;
}

.qr-placeholder {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    max-width: 80px;
    line-height: 1.4;
}

/* ── TICKER BAR ── */
.ticker-bar {
    position: relative;
    z-index: 2;
    height: 36px;
    overflow: hidden;
    background: #141414;
    border-top: 1px solid rgba(139,115,64,0.2);
    display: flex;
    align-items: center;
}

.ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
    font-size: 14px;
    color: var(--gold-bright);
    letter-spacing: 0.06em;
    padding-left: 100%;
}

.ticker-bar.hidden { display: none; }

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ── Animations ── */
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.price-row {
    animation: fade-in 0.6s ease-out both;
}

.price-row:nth-child(1) { animation-delay: 0.1s; }
.price-row:nth-child(2) { animation-delay: 0.18s; }
.price-row:nth-child(3) { animation-delay: 0.26s; }
.price-row:nth-child(4) { animation-delay: 0.34s; }
.price-row:nth-child(5) { animation-delay: 0.42s; }
.price-row:nth-child(6) { animation-delay: 0.50s; }
.price-row:nth-child(7) { animation-delay: 0.58s; }
.price-row:nth-child(8) { animation-delay: 0.66s; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
