/* ============================================================
   UUACK — NIGHT RIDE v2
   테마파크 스릴 정체성 · 다크 우선 · 글래스 + 그라데이션 액센트
   ============================================================ */

:root,
[data-theme="dark"] {
    --u-bg:            #0b0f24;
    --u-bg-2:          #0e1230;
    --u-surface:       rgba(27, 33, 72, 0.72);
    --u-surface-solid: #1b2148;
    --u-surface-2:     rgba(20, 26, 58, 0.6);
    --u-border:        rgba(120, 132, 200, 0.16);
    --u-border-strong: rgba(120, 132, 200, 0.30);
    --u-text:          #eef0fb;
    --u-text-soft:     #aab2e0;
    --u-text-dim:      #7a82b8;

    --u-coral:         #ff5a3c;
    --u-magenta:       #ff2e86;
    --u-cyan:          #22d3ee;
    --u-gold:          #ffb020;
    --u-green:         #34d399;

    --u-grad:          linear-gradient(135deg, #ff5a3c 0%, #ff2e86 100%);
    --u-grad-cyan:     linear-gradient(135deg, #22d3ee 0%, #4f7cff 100%);
    --u-glow-coral:    0 8px 30px rgba(255, 90, 60, 0.35);
    --u-glow-cyan:     0 0 0 1px rgba(34, 211, 238, 0.25), 0 8px 26px rgba(34, 211, 238, 0.18);

    --u-r-sm: 10px;
    --u-r:    16px;
    --u-r-lg: 22px;
    --u-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

    --u-nav-w: 232px;
}

[data-theme="light"] {
    --u-bg:            #f5f6fc;
    --u-bg-2:          #eef0f8;
    --u-surface:       rgba(255, 255, 255, 0.85);
    --u-surface-solid: #ffffff;
    --u-surface-2:     rgba(255, 255, 255, 0.7);
    --u-border:        rgba(20, 26, 58, 0.10);
    --u-border-strong: rgba(20, 26, 58, 0.18);
    --u-text:          #141a3a;
    --u-text-soft:     #4a5280;
    --u-text-dim:      #7a82a8;
    --u-shadow: 0 12px 40px rgba(20, 26, 58, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--u-bg);
    color: var(--u-text);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        radial-gradient(900px 600px at 12% -8%, rgba(255, 90, 60, 0.10), transparent 60%),
        radial-gradient(900px 600px at 100% 0%, rgba(34, 211, 238, 0.08), transparent 55%),
        var(--u-bg);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ───────────────── 앱 셸 레이아웃 ───────────────── */

#uuack_app { min-height: 100vh; }

.u-shell {
    display: grid;
    grid-template-columns: var(--u-nav-w) minmax(0, 1fr);
    gap: 0;
    max-width: 1320px;
    margin: 0 auto;
}

/* 좌측 네비 */
.u-nav {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid var(--u-border);
    backdrop-filter: blur(12px);
}

.u-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 6px 10px 18px;
}
.u-logo__mark {
    width: 34px; height: 34px;
    border-radius: 11px;
    background: var(--u-grad);
    display: grid; place-items: center;
    color: #0b0f24; flex-shrink: 0;
    box-shadow: var(--u-glow-coral);
}
.u-logo__mark svg { width: 20px; height: 20px; }
.u-logo__text {
    font-size: 21px; font-weight: 800;
    letter-spacing: 1px;
    background: var(--u-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.u-nav__item {
    display: flex; align-items: center; gap: 13px;
    padding: 11px 13px;
    border-radius: 13px;
    color: var(--u-text-soft);
    font-size: 14.5px; font-weight: 500;
    transition: background .15s, color .15s, transform .12s;
    position: relative;
}
.u-nav__item svg { width: 21px; height: 21px; flex-shrink: 0; }
.u-nav__item:hover { background: var(--u-surface-2); color: var(--u-text); }
.u-nav__item.is-active {
    color: #fff;
    background: rgba(255, 90, 60, 0.14);
}
.u-nav__item.is-active::before {
    content: ""; position: absolute; left: -14px; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 0 4px 4px 0;
    background: var(--u-grad);
}
.u-nav__item.is-active svg { color: var(--u-coral); }
.u-nav__item.is-soon { opacity: .5; }
.u-nav__soon {
    margin-left: auto;
    font-size: 10px; font-weight: 600;
    padding: 2px 7px; border-radius: 20px;
    background: var(--u-surface-2); color: var(--u-text-dim);
}

.u-nav__spacer { flex: 1; }
.u-nav__bottom { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--u-border); }
.u-nav__me { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 13px; }
.u-nav__me:hover { background: var(--u-surface-2); }
.u-nav__me-text { line-height: 1.25; min-width: 0; }
.u-nav__me-nick { font-size: 13px; font-weight: 600; color: var(--u-text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-nav__me-meta { font-size: 11px; color: var(--u-gold); }

.u-nav__controls { display: flex; gap: 8px; align-items: center; }

/* 메인 */
.u-main {
    min-width: 0;
    padding: 26px 30px 96px;
}

/* ───────────────── 공통 컴포넌트 ───────────────── */

.u-card {
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: var(--u-r);
    backdrop-filter: blur(10px);
    transition: transform .16s ease, border-color .16s, box-shadow .16s;
}
.u-card--hover:hover {
    transform: translateY(-3px);
    border-color: var(--u-border-strong);
    box-shadow: var(--u-shadow);
}

.u-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.u-h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin: 0; }
.u-h2 { font-size: 19px; font-weight: 700; margin: 0 0 14px; }
.u-sub { color: var(--u-text-dim); font-size: 13.5px; margin-top: 4px; }

.u-eyebrow {
    font-size: 11.5px; font-weight: 600; letter-spacing: 1.4px;
    text-transform: uppercase; color: var(--u-cyan);
    margin-bottom: 8px;
}

/* 버튼 */
.u-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 13px;
    font-size: 14px; font-weight: 600;
    border: 1px solid var(--u-border-strong);
    background: var(--u-surface-2); color: var(--u-text);
    transition: transform .12s, background .15s, box-shadow .15s;
}
.u-btn svg { width: 18px; height: 18px; }
.u-btn:hover { background: var(--u-surface-solid); }
.u-btn:active { transform: scale(.97); }
.u-btn--primary {
    background: var(--u-grad); color: #fff; border: none;
    box-shadow: var(--u-glow-coral);
}
.u-btn--primary:hover { background: var(--u-grad); filter: brightness(1.08); }
.u-btn--cyan { background: var(--u-grad-cyan); color: #04243a; border: none; }
.u-btn--cyan:hover { background: var(--u-grad-cyan); filter: brightness(1.08); }
.u-btn--ghost { background: transparent; }
.u-btn--ghost:hover { background: var(--u-surface-2); }
.u-btn--sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }

.u-iconbtn {
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    border: 1px solid var(--u-border); background: var(--u-surface-2);
    color: var(--u-text-soft);
}
.u-iconbtn:hover { color: var(--u-text); background: var(--u-surface-solid); }
.u-iconbtn svg { width: 19px; height: 19px; }

/* 칩 / 배지 */
.u-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    background: var(--u-surface-2); color: var(--u-text-soft);
    border: 1px solid var(--u-border);
}
.u-chip svg { width: 13px; height: 13px; }
.u-chip--coral  { background: rgba(255, 90, 60, 0.15); color: #ff7a5e; border-color: transparent; }
.u-chip--cyan   { background: rgba(34, 211, 238, 0.15); color: var(--u-cyan); border-color: transparent; }
.u-chip--gold   { background: rgba(255, 176, 32, 0.15); color: var(--u-gold); border-color: transparent; }
.u-chip--green  { background: rgba(52, 211, 153, 0.16); color: var(--u-green); border-color: transparent; }
.u-chip--dim    { background: rgba(154, 162, 200, 0.14); color: var(--u-text-dim); border-color: transparent; }

/* 필터 바 */
.u-filterbar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    margin-bottom: 22px;
}
.u-search {
    display: flex; align-items: center; gap: 9px;
    flex: 1; min-width: 220px;
    padding: 11px 15px; border-radius: 13px;
    background: var(--u-surface); border: 1px solid var(--u-border);
}
.u-search svg { width: 18px; height: 18px; color: var(--u-text-dim); flex-shrink: 0; }
.u-search input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--u-text); font-size: 14px;
}
.u-search input::placeholder { color: var(--u-text-dim); }
.u-select {
    padding: 11px 14px; border-radius: 13px;
    background: var(--u-surface); border: 1px solid var(--u-border);
    color: var(--u-text); font-size: 14px; outline: none;
}

/* 칩 필터(타입/국가) */
.u-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.u-pill {
    padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 600;
    background: var(--u-surface-2); border: 1px solid var(--u-border); color: var(--u-text-soft);
    transition: all .14s;
}
.u-pill:hover { color: var(--u-text); border-color: var(--u-border-strong); }
.u-pill.is-active { background: var(--u-grad); color: #fff; border-color: transparent; box-shadow: var(--u-glow-coral); }

/* 그리드 */
.u-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.u-grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* 파크 / 어트랙션 카드 */
.u-tile { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.u-tile__banner {
    height: 96px; position: relative;
    background: var(--u-grad-cyan);
    display: flex; align-items: flex-end; padding: 12px 14px;
}
.u-tile__banner--coaster { background: linear-gradient(135deg, #ff5a3c, #ff2e86); }
.u-tile__banner--thrill  { background: linear-gradient(135deg, #f59e0b, #ff5a3c); }
.u-tile__banner--kids    { background: linear-gradient(135deg, #34d399, #a3e635); }
.u-tile__banner--water   { background: linear-gradient(135deg, #22d3ee, #4f7cff); }
.u-tile__banner--flat    { background: linear-gradient(135deg, #a855f7, #6366f1); }
.u-tile__banner--dark    { background: linear-gradient(135deg, #4b1d6e, #1b2148); }
.u-tile__banner svg { width: 38px; height: 38px; color: rgba(255,255,255,.85); position: absolute; right: 14px; top: 14px; }
.u-tile__body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.u-tile__title { font-size: 15.5px; font-weight: 700; line-height: 1.25; }
.u-tile__meta { font-size: 12.5px; color: var(--u-text-dim); }
.u-tile__stats { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 2px; }
.u-tile__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }

/* 스탯 타일 (bento) */
.u-bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.u-stat {
    background: var(--u-surface); border: 1px solid var(--u-border);
    border-radius: var(--u-r-sm); padding: 14px 16px;
}
.u-stat__num { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.u-stat__num--cyan { color: var(--u-cyan); }
.u-stat__num--coral { color: var(--u-coral); }
.u-stat__num--gold { color: var(--u-gold); }
.u-stat__label { font-size: 11.5px; color: var(--u-text-dim); margin-top: 2px; letter-spacing: .3px; }

/* 평점 */
.u-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--u-gold); font-size: 13px; font-weight: 600; }
.u-rating svg { width: 14px; height: 14px; }

/* 빈 상태 */
.u-empty { text-align: center; padding: 60px 20px; color: var(--u-text-dim); }
.u-empty svg { width: 46px; height: 46px; opacity: .5; margin-bottom: 12px; }

/* 토스트 */
.u-toast {
    position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
    background: var(--u-surface-solid); color: var(--u-text);
    border: 1px solid var(--u-border-strong); border-radius: 13px;
    padding: 12px 20px; font-size: 14px; font-weight: 500;
    box-shadow: var(--u-shadow); opacity: 0; pointer-events: none;
    transition: opacity .22s, transform .22s; z-index: 200;
}
.u-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 모달 (수정신청 등) */
.u-modal-bg {
    position: fixed; inset: 0; background: rgba(5, 7, 20, 0.7);
    backdrop-filter: blur(4px); display: none;
    align-items: center; justify-content: center; z-index: 300; padding: 20px;
}
.u-modal-bg.is-show { display: flex; }
.u-modal {
    width: 100%; max-width: 560px; max-height: 86vh; overflow: auto;
    background: var(--u-surface-solid); border: 1px solid var(--u-border-strong);
    border-radius: var(--u-r-lg); padding: 24px;
    box-shadow: var(--u-shadow);
}
.u-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.u-modal__title { font-size: 18px; font-weight: 700; }
.u-field { margin-bottom: 14px; }
.u-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--u-text-soft); margin-bottom: 6px; }
.u-input, .u-textarea {
    width: 100%; padding: 11px 13px; border-radius: var(--u-r-sm);
    background: var(--u-surface-2); border: 1px solid var(--u-border);
    color: var(--u-text); font-size: 14px; font-family: inherit; outline: none;
}
.u-input:focus, .u-textarea:focus { border-color: var(--u-cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
.u-textarea { min-height: 84px; resize: vertical; }
.u-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 스켈레톤 */
.u-skel { background: linear-gradient(90deg, var(--u-surface-2) 25%, var(--u-surface) 50%, var(--u-surface-2) 75%); background-size: 200% 100%; animation: u-shimmer 1.3s infinite; border-radius: var(--u-r-sm); }
@keyframes u-shimmer { to { background-position: -200% 0; } }

/* ───────────────── 사진 / 갤러리 ───────────────── */
.u-cover {
    width: 100%; aspect-ratio: 21 / 9; max-height: 320px;
    border-radius: var(--u-r); overflow: hidden; margin-bottom: 18px;
    background: var(--u-surface-2); border: 1px solid var(--u-border);
}
.u-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.u-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.u-photo { position: relative; margin: 0; border-radius: var(--u-r-sm); overflow: hidden; aspect-ratio: 1; background: var(--u-surface-2); border: 1px solid var(--u-border); }
.u-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-photo.is-cover { outline: 2px solid var(--u-coral); outline-offset: -2px; }
.u-photo__cover { position: absolute; top: 6px; left: 6px; background: var(--u-grad); color: #fff; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.u-photo__ops { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.u-photo:hover .u-photo__ops, .u-photo.is-pending .u-photo__ops { opacity: 1; }
.u-photo__op { width: 27px; height: 27px; border-radius: 8px; border: none; background: rgba(11,15,36,.7); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.u-photo__op svg { width: 14px; height: 14px; }
.u-photo__op--ok { background: rgba(52,211,153,.9); color: #04243a; }
.u-photo__op--danger { background: rgba(226,75,74,.9); }

/* 커버 이미지 배너(카드) */
.u-tile__banner--photo { background-size: cover; background-position: center; }
.u-tile__banner--photo svg { display: none; }

/* 이미지 라이트박스 */
.u-lightbox {
    position: fixed; inset: 0; z-index: 400; display: none;
    align-items: center; justify-content: center;
    background: rgba(5, 7, 20, 0.9); backdrop-filter: blur(6px); padding: 24px;
    opacity: 0; transition: opacity .18s;
}
.u-lightbox.is-show { display: flex; opacity: 1; }
.u-lightbox__img {
    max-width: 92vw; max-height: 88vh; border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); object-fit: contain;
    transform: scale(.96); transition: transform .2s;
}
.u-lightbox.is-show .u-lightbox__img { transform: scale(1); }
.u-lightbox__close {
    position: absolute; top: 18px; right: 18px; width: 44px; height: 44px;
    border-radius: 12px; border: none; background: rgba(255, 255, 255, 0.12);
    color: #fff; display: grid; place-items: center; cursor: pointer;
}
.u-lightbox__close svg { width: 22px; height: 22px; }
.u-lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }

/* ───────────────── 모바일 ───────────────── */
.u-tabbar { display: none; }

@media (max-width: 860px) {
    .u-shell { grid-template-columns: 1fr; }
    .u-nav {
        position: fixed; bottom: 0; left: 0; right: 0; top: auto;
        height: auto; flex-direction: row; z-index: 100;
        padding: 8px 6px; gap: 2px;
        border-right: none; border-top: 1px solid var(--u-border);
        background: var(--u-surface); justify-content: space-around;
    }
    .u-logo, .u-nav__bottom, .u-nav__soon { display: none; }
    .u-nav__spacer { display: none; }
    .u-nav__item { flex-direction: column; gap: 3px; padding: 7px 6px; font-size: 10px; border-radius: 11px; flex: 1; justify-content: center; }
    .u-nav__item span { font-size: 10px; }
    .u-nav__item.is-active::before { display: none; }
    .u-nav__item.is-soon { display: none; }
    .u-main { padding: 18px 16px 90px; }
    .u-h1 { font-size: 23px; }
}
