:root {
    --bg: #0b0d13;
    --bg2: #111522;
    --panel: rgba(24, 28, 42, 0.88);
    --panel2: rgba(31, 35, 52, 0.92);
    --line: rgba(255, 255, 255, 0.09);
    --text: #eef2ff;
    --muted: #a4adbf;
    --gold: #f0c66a;
    --gold2: #ffe29a;
    --purple: #8b5cf6;
    --purple2: #c4b5fd;
    --green: #55d49f;
    --blue: #60a5fa;
    --red: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Pretendard", "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 4%, rgba(139, 92, 246, 0.32), transparent 34%),
        radial-gradient(circle at 86% 15%, rgba(240, 198, 106, 0.18), transparent 32%),
        radial-gradient(circle at 50% 90%, rgba(96, 165, 250, 0.09), transparent 38%),
        var(--bg);
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(10, 12, 19, 0.78);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 18px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: -0.02em; }
.logo-mark {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px;
    background: linear-gradient(135deg, rgba(240,198,106,.95), rgba(139,92,246,.92));
    color: #101219; box-shadow: 0 0 32px rgba(240,198,106,.22);
}
.logo small { display:block; color: var(--muted); font-size: 11px; font-weight: 600; margin-top: 1px; }
.nav { display:flex; align-items:center; gap: 7px; }
.nav a {
    color: #c9d1e3; padding: 10px 12px; border-radius: 999px; font-size: 14px; font-weight: 700;
    transition: .18s ease;
}
.nav a:hover, .nav a.active { color: #101219; background: linear-gradient(135deg, var(--gold), var(--gold2)); }
.mobile-toggle { display:none; background: transparent; color: var(--text); border:1px solid var(--line); border-radius:12px; padding:8px 10px; }

.hero { position: relative; padding: 74px 0 46px; overflow: hidden; }
.hero-grid { display:grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items:center; }
.eyebrow { color: var(--gold); font-weight: 900; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 14px 0 18px; font-size: clamp(38px, 5vw, 70px); line-height: 1.03; letter-spacing: -0.06em; }
.gradient-text { color: transparent; background: linear-gradient(135deg, var(--gold2), var(--gold), var(--purple2)); -webkit-background-clip: text; background-clip:text; }
.lead { color: #cbd5e1; font-size: 18px; line-height: 1.7; margin:0 0 28px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; }
.btn {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-height: 44px; padding: 0 18px; border-radius: 14px; border:1px solid transparent;
    font-weight: 900; cursor:pointer; transition: .18s ease;
}
.btn-primary { color:#111318; background: linear-gradient(135deg, var(--gold), var(--gold2)); box-shadow: 0 12px 34px rgba(240,198,106,.22); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 42px rgba(240,198,106,.28); }
.btn-secondary { color:#eee; background: rgba(255,255,255,.06); border-color: var(--line); }
.btn-secondary:hover { border-color: rgba(240,198,106,.55); color: var(--gold2); }
.btn-danger { color:#fff; background: rgba(251,113,133,.14); border-color: rgba(251,113,133,.28); }

.orb-card {
    position:relative; min-height: 420px; border:1px solid var(--line); border-radius: 34px;
    background: linear-gradient(145deg, rgba(23,27,41,.84), rgba(14,17,27,.92));
    box-shadow: var(--shadow); overflow:hidden; display:grid; place-items:center;
}
.orb-card::before { content:""; position:absolute; inset:-80px; background: conic-gradient(from 90deg, transparent, rgba(240,198,106,.12), rgba(139,92,246,.26), transparent); animation: spin 12s linear infinite; }
.orb-card::after { content:""; position:absolute; inset:18px; border-radius: 28px; background: rgba(11,13,19,.76); border:1px solid rgba(255,255,255,.06); }
.hero-image-card { padding: 18px; }
.hero-timepiece {
    position: relative; z-index: 2; width: min(100%, 520px); display: block;
    border-radius: 30px; filter: drop-shadow(0 28px 70px rgba(139,92,246,.32));
}


/* Hero image: 3안 - 사각 배경 제거, 원형 엠블럼만 배경 위에 자연스럽게 배치 */
.hero-image-card {
    min-height: 420px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    padding: 0;
}
.hero-image-card::before {
    content: "";
    position: absolute;
    inset: 4% 8%;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.36), transparent 54%),
        radial-gradient(circle at 50% 50%, rgba(240, 198, 106, 0.18), transparent 70%);
    filter: blur(46px);
    opacity: 0.9;
    animation: none;
}
.hero-image-card::after {
    display: none;
}
.hero-image-card .hero-timepiece {
    width: min(100%, 560px);
    border-radius: 0;
    filter:
        drop-shadow(0 30px 78px rgba(139, 92, 246, 0.38))
        drop-shadow(0 14px 42px rgba(240, 198, 106, 0.16));
}

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

.section { padding: 42px 0; }
.section-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-end; margin-bottom:20px; }
.section-title { margin:0; font-size: 28px; letter-spacing:-.04em; }
.section-desc { color: var(--muted); margin:7px 0 0; line-height:1.6; }
.grid { display:grid; gap:16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card, .panel {
    border:1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 16px 60px rgba(0,0,0,.22);
}
.card { padding: 22px; }
.card-icon { width:44px; height:44px; border-radius:16px; display:grid; place-items:center; margin-bottom:16px; background: rgba(139,92,246,.13); color: var(--gold2); font-size:22px; }
.card h3 { margin: 0 0 9px; font-size:18px; }
.card p { margin:0; color: var(--muted); line-height:1.6; font-size:14px; }
.panel { overflow:hidden; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; border-bottom:1px solid var(--line); background: rgba(255,255,255,.025); }
.panel-head h3 { margin:0; font-size:18px; }
.more { color:var(--gold2); font-weight:800; font-size:13px; }

.board-list { width:100%; border-collapse:collapse; }
.board-list th, .board-list td { padding: 14px 16px; border-bottom:1px solid var(--line); text-align:left; font-size:14px; }
.board-list th { color:#dce4f5; background:rgba(255,255,255,.035); font-size:13px; }
.board-list td { color:#c8d1e4; }
.board-list tr:hover td { background: rgba(255,255,255,.025); }
.board-title { color:#f8fafc; font-weight:850; }
.muted { color: var(--muted); }
.badge { display:inline-flex; align-items:center; justify-content:center; min-width:52px; padding:5px 9px; border-radius:999px; font-size:12px; font-weight:900; border:1px solid var(--line); }
.badge.gold { color:#111318; background:var(--gold); border-color:transparent; }
.badge.green { color:#082017; background:rgba(85,212,159,.95); border-color:transparent; }
.badge.blue { color:#08182c; background:rgba(96,165,250,.95); border-color:transparent; }
.badge.purple { color:#170d2b; background:rgba(196,181,253,.95); border-color:transparent; }
.badge.red { color:#330914; background:rgba(251,113,133,.95); border-color:transparent; }
.badge.gray { color:#dce4f5; background:rgba(255,255,255,.08); }

.cta-strip { display:grid; grid-template-columns: .9fr 1.4fr auto; gap:18px; align-items:center; padding:24px; border:1px solid rgba(240,198,106,.18); border-radius: 26px; background: linear-gradient(135deg, rgba(240,198,106,.11), rgba(139,92,246,.13), rgba(24,28,42,.92)); box-shadow: var(--shadow); }
.version { font-size: 42px; font-weight: 950; letter-spacing:-.05em; }
.check-list { list-style:none; padding:0; margin:0; display:grid; gap:8px; color:#d3dbee; }
.check-list li::before { content:"✓"; color:var(--gold); font-weight:900; margin-right:8px; }

.page-hero { padding: 44px 0 24px; }
.page-title { margin: 0; font-size: clamp(34px, 4vw, 52px); letter-spacing:-.06em; }
.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin-bottom:16px; }
.filters { display:flex; flex-wrap:wrap; gap:8px; }
.chip { display:inline-flex; align-items:center; min-height:36px; padding:0 13px; border:1px solid var(--line); border-radius:999px; color:#cbd5e1; background:rgba(255,255,255,.04); font-weight:800; font-size:13px; }
.chip.active { color:#111318; background:var(--gold); border-color:transparent; }
.search { display:flex; gap:8px; }
.input, .select, .textarea { width:100%; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.045); color:var(--text); padding:12px 13px; outline:none; }
.textarea { min-height: 180px; resize:vertical; line-height:1.7; }
.form-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }
.form-row { margin-bottom:14px; }
.form-row label { display:block; color:#dbe4f7; font-weight:850; margin-bottom:7px; font-size:14px; }
.form-note { color:var(--muted); font-size:13px; line-height:1.6; }

.article { padding: 26px; }
.article-meta { display:flex; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:13px; margin: 10px 0 22px; }
.article h2 { margin:0; font-size:30px; letter-spacing:-.04em; }
.article-body { color:#d7def0; line-height:1.85; }
.attach-box { margin-top:22px; padding:16px; border:1px dashed rgba(240,198,106,.35); border-radius:16px; background:rgba(240,198,106,.06); }
.reply-box { margin-top:18px; padding:18px; border-radius:18px; background:rgba(85,212,159,.08); border:1px solid rgba(85,212,159,.22); }

.admin-layout { display:grid; grid-template-columns: 250px 1fr; gap:18px; }
.sidebar { padding:18px; position:sticky; top:90px; align-self:start; }
.sidebar a { display:flex; align-items:center; gap:8px; padding:12px; border-radius:13px; color:#cbd5e1; font-weight:800; }
.sidebar a.active, .sidebar a:hover { background:rgba(240,198,106,.13); color:var(--gold2); }
.stat { padding:20px; }
.stat strong { display:block; font-size:32px; margin-top:8px; }
.stat span { color:var(--muted); }

.notice-box { padding:18px; border-radius:18px; border:1px solid rgba(96,165,250,.25); background:rgba(96,165,250,.08); color:#dbeafe; line-height:1.7; }
.faq-item { padding:18px 20px; border-bottom:1px solid var(--line); }
.faq-q { display:flex; justify-content:space-between; gap:12px; cursor:pointer; font-weight:900; }
.faq-a { display:none; color:var(--muted); line-height:1.7; margin-top:12px; }
.faq-item.open .faq-a { display:block; }

.footer { margin-top:60px; padding:34px 0; border-top:1px solid var(--line); color:var(--muted); background:rgba(0,0,0,.18); }
.footer-inner { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:center; }
.footer-links { display:flex; gap:14px; flex-wrap:wrap; }

@media (max-width: 900px) {
    .mobile-toggle { display:block; }
    .nav { display:none; position:absolute; left:18px; right:18px; top:72px; flex-direction:column; align-items:stretch; padding:12px; border:1px solid var(--line); border-radius:18px; background:rgba(12,15,24,.96); }
    .nav.open { display:flex; }
    .hero-grid, .grid-2, .grid-3, .grid-4, .cta-strip, .admin-layout { grid-template-columns: 1fr; }
    .orb-card { min-height:310px; }
    .magic-orb { width:210px; height:210px; }
    .board-list { display:block; overflow-x:auto; }
    .section-head, .toolbar, .footer-inner { align-items:flex-start; flex-direction:column; }
    .form-grid { grid-template-columns:1fr; }
}

/* PHP functional version additions */
.board-table { width:100%; border-collapse:collapse; }
.board-table th, .board-table td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; font-size:14px; vertical-align:middle; }
.board-table th { color:#dce4f5; background:rgba(255,255,255,.035); font-size:13px; }
.board-table td { color:#c8d1e4; }
.board-table tr:hover td { background:rgba(255,255,255,.025); }
.empty { text-align:center; color:var(--muted); padding:34px !important; }
.search-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.search-form input, .search-form select,
.form-panel input, .form-panel select, .form-panel textarea,
.narrow input, .narrow select, .narrow textarea {
    width:100%; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.045);
    color:var(--text); padding:12px 13px; outline:none;
}
.search-form input, .search-form select { width:auto; min-width:150px; }
.form-panel label { display:block; color:#dbe4f7; font-weight:850; margin-bottom:10px; font-size:14px; }
.form-panel textarea { resize:vertical; line-height:1.7; min-height:180px; }
.form-grid .wide { grid-column:1 / -1; }
.check-row { display:flex !important; align-items:center; gap:10px; }
.check-row input { width:auto !important; }
.notice { padding:14px 16px; border-radius:16px; border:1px solid rgba(96,165,250,.25); background:rgba(96,165,250,.08); color:#dbeafe; line-height:1.7; margin-bottom:16px; }
.notice.error { border-color:rgba(251,113,133,.35); background:rgba(251,113,133,.12); color:#ffe4e6; }
.post-view { padding:26px; }
.post-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; color:var(--muted); margin-bottom:20px; }
.post-content { color:#d7def0; line-height:1.85; }
.post-content p { margin:0 0 12px; }
.attachments { margin-top:22px; padding:16px; border:1px dashed rgba(240,198,106,.35); border-radius:16px; background:rgba(240,198,106,.06); }
.file-link { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); color:var(--gold2); font-weight:800; }
.file-link:last-child { border-bottom:0; }
.bottom-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.narrow { max-width:520px; }
.timeline { display:grid; gap:18px; }
.update-card { padding-bottom:18px; }
.update-card .post-content { padding:0 20px; }
.faq-list { display:grid; gap:12px; }
details.faq-item { border:1px solid var(--line); border-radius:18px; background:var(--panel); padding:0; overflow:hidden; }
details.faq-item summary { cursor:pointer; padding:18px 20px; font-weight:900; }
details.faq-item div { padding:0 20px 18px; color:var(--muted); line-height:1.7; }
.download-panel { padding:26px; }
code { color:var(--gold2); }
@media (max-width: 900px) {
    .board-table { display:block; overflow-x:auto; }
    .search-form, .search-form input, .search-form select { width:100%; }
}


/* Dark select dropdown fix */
.form-panel select,
.search-form select,
.narrow select,
.select {
    color-scheme: dark;
    background-color: #1f2533;
    color: #f1f5f9;
}

.form-panel select option,
.search-form select option,
.narrow select option,
.select option {
    background-color: #1f2533;
    color: #f1f5f9;
}

.form-panel select option:checked,
.search-form select option:checked,
.narrow select option:checked,
.select option:checked {
    background-color: #5b3fd8;
    color: #ffffff;
}

.form-panel input[type="file"],
.narrow input[type="file"] {
    background-color: #1f2533;
    color: #f1f5f9;
}

.form-panel input[type="file"]::file-selector-button,
.narrow input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #111318;
    font-weight: 900;
    padding: 8px 12px;
    cursor: pointer;
}

/* Admin action buttons inside post view */
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}
.admin-actions form {
    margin: 0;
}
.admin-actions .btn {
    min-height: 44px;
}

/* Mobile hero readability and admin utility pages */
.admin-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.file-admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.file-admin-row:last-child { border-bottom: 0; }
.file-admin-meta { color: var(--muted); font-size: 13px; }
.success { border-color: rgba(85,212,159,.35); background: rgba(85,212,159,.10); color: #dcfce7; }

@media (max-width: 768px) {
    .hero { padding-top: 64px; }
    .gradient-text {
        background: none;
        color: #ffe28a;
        -webkit-text-fill-color: #ffe28a;
        text-shadow:
            0 0 18px rgba(255, 226, 138, 0.42),
            0 3px 12px rgba(0, 0, 0, 0.72);
    }
    .hero .lead {
        color: #dce6f8;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
    }
    .hero-actions .btn {
        flex: 1 1 100%;
    }
    .hero-image-card {
        min-height: 260px;
        margin-top: 10px;
    }
    .hero-image-card .hero-timepiece {
        width: min(100%, 430px);
    }
}

/* Mobile form layout fix: prevent labels such as '분류' from being clipped */
.form-panel {
    padding: 26px;
}

.form-panel .form-grid > label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    line-height: 1.35;
}

.form-panel input,
.form-panel select,
.form-panel textarea {
    display: block;
    min-width: 0;
}

.form-panel input[type="file"] {
    min-height: 54px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 34px 0 16px;
    }

    .section {
        padding: 26px 0;
    }

    .form-panel {
        padding: 18px;
        overflow: visible;
    }

    .form-panel .form-grid {
        gap: 18px;
    }

    .form-panel .form-grid > label {
        font-size: 15px;
        margin: 0;
    }

    .form-panel input,
    .form-panel select,
    .form-panel textarea {
        min-height: 52px;
        font-size: 16px;
    }

    .form-panel textarea {
        min-height: 190px;
    }

    .check-row {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }
}

.video-section {
    margin-top: 20px;
}

.video-card {
    padding: 18px;
    border: 1px solid rgba(255, 217, 120, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(126, 87, 255, 0.18), transparent 34%),
        rgba(18, 24, 38, 0.86);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #05070d;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .video-card {
        padding: 10px;
        border-radius: 18px;
    }

    .video-frame {
        border-radius: 14px;
    }
}

