@charset "utf-8";

/* ============================================================
   PROGRAM88 - Layout System (layout.css)
   레이아웃: 헤더, 푸터, 사이드바, 그리드, 페이지 구조
   ============================================================ */

/* ====== Page Layout ====== */
.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-content {
  flex: 1;
  padding: 24px 0 48px;
}

/* ====== Page Header (Title Area) ====== */
.page-head {
  padding: 26px 0 10px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.page-title h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 768px) {
  .page-title {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ====== PC Header (Topbar) ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(11, 15, 23, .88), rgba(11, 15, 23, .58));
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .2px;
  flex-shrink: 0;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 14px 40px rgba(110, 168, 255, .18);
  position: relative;
  overflow: hidden;
}

.logo-badge::before {
  content: "";
  position: absolute;
  inset: -70%;
  background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, .85) 48%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, .85) 52%, transparent 70%);
  transform: rotate(25deg);
  animation: sheen 2.2s linear infinite;
  filter: blur(4px);
}

@keyframes sheen {
  0% { transform: translateX(-120%) rotate(25deg); }
  100% { transform: translateX(120%) rotate(25deg); }
}

/* PC Navigation (pill style) */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(18, 26, 45, .55);
  border-radius: var(--radius-full);
}

.nav a {
  padding: 9px 14px;
  border-radius: var(--radius-full);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--duration) var(--ease);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(110, 168, 255, .22), rgba(138, 125, 255, .18));
  border: 1px solid rgba(110, 168, 255, .22);
}

/* Nav Dropdown */
.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg2);
  box-shadow: var(--shadow);
  z-index: var(--z-dropdown);
  opacity: 0;
  pointer-events: none;
  transition: var(--duration) var(--ease);
}

/* Invisible bridge to keep hover active between parent and dropdown */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--muted);
}

.nav-dropdown a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.nav-dropdown a i {
  width: 18px;
  text-align: center;
  color: var(--brand);
  font-size: 13px;
}

/* Auth Buttons */
.auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Hide nav on smaller screens */
@media (max-width: 1100px) {
  .nav { display: none; }
}

/* ====== Mobile Header ====== */
.m-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(11, 15, 23, .88), rgba(11, 15, 23, .62));
  border-bottom: 1px solid var(--line);
}

.m-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--duration) var(--ease);
}

.hamburger:hover {
  background: rgba(255, 255, 255, .09);
}

.hamburger .bars {
  width: 18px;
  height: 12px;
  position: relative;
}

.hamburger .bars::before,
.hamburger .bars::after,
.hamburger .bars span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(233, 238, 249, .92);
  border-radius: 99px;
}

.hamburger .bars::before { top: 0; }
.hamburger .bars span { top: 5px; }
.hamburger .bars::after { bottom: 0; }

.m-title {
  font-weight: 850;
  letter-spacing: -.2px;
  font-size: 16px;
}

.m-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.m-actions .mini {
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* ====== Drawer (Mobile Menu) ====== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  pointer-events: none;
  transition: var(--duration) var(--ease);
  z-index: var(--z-modal-overlay);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(86vw, 320px);
  background: linear-gradient(180deg, rgba(15, 22, 38, .98), rgba(11, 15, 23, .98));
  border-right: 1px solid rgba(255, 255, 255, .10);
  transform: translateX(-102%);
  transition: transform .28s var(--ease-out);
  z-index: var(--z-drawer);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-close {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-section-title {
  padding: 12px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.drawer-nav a {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: rgba(233, 238, 249, .76);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--duration) var(--ease);
}

.drawer-nav a:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .08);
  color: var(--text);
}

.drawer-nav a.active {
  background: rgba(110, 168, 255, .1);
  border-color: rgba(110, 168, 255, .2);
  color: var(--brand);
}

.drawer-nav a i {
  width: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.drawer-nav a.active i {
  color: var(--brand);
}

/* Drawer Accordion Sub-menu */
.drawer-accordion {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s var(--ease);
}

.drawer-accordion.open {
  max-height: 500px;
}

.drawer-accordion a {
  padding-left: 44px;
  font-size: 13px;
}

.drawer-toggle {
  justify-content: space-between;
}

.drawer-toggle .arrow {
  transition: transform .3s var(--ease);
  font-size: 12px;
  color: var(--muted2);
}

.drawer-toggle.open .arrow {
  transform: rotate(180deg);
}

.drawer-auth {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
}

.drawer-auth .btn {
  flex: 1;
  text-align: center;
}

/* ====== Footer ====== */
.main-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 22, 38, .60), rgba(11, 15, 23, .82));
  padding: 40px 0 24px;
  margin-top: auto;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: 24px;
  align-items: start;
}

.foot-brand {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.foot-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.foot-links-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.foot-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color var(--duration) var(--ease);
}

.foot-links a:hover {
  color: var(--text);
}

.foot-info {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.foot-info b {
  color: var(--text);
  font-weight: 600;
}

.foot-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Kakao CTA */
.kakao-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  transition: var(--duration) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.kakao-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .09);
}

.kakao-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FEE500, #ffd34e);
  color: #1f1f1f;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
}

.kakao-txt b {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.kakao-txt span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

/* Kakao Fixed Button */
.kakao-fixed {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-fixed);
}

.kakao-fixed img {
  width: 60px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  transition: var(--duration) var(--ease);
}

.kakao-fixed img:hover {
  transform: scale(1.08);
}

/* Copyright Bar */
.copyright-bar {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(233, 238, 249, .45);
}

.copyright-bar a {
  color: rgba(233, 238, 249, .55);
}

.copyright-bar a:hover {
  color: var(--text);
}

/* Footer responsive */
@media (max-width: 980px) {
  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-right {
    align-items: flex-start;
  }
}

/* ====== Grid System ====== */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-5 { grid-template-columns: 1fr; }
}

/* ====== Section ====== */
.section {
  padding: 120px 0;
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: rgba(18, 26, 45, .55);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.3px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 50px;
  max-width: 600px;
}

.section.center {
  text-align: center;
}

.section.center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 980px) {
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  .section { padding: 60px 0; }
}

/* ====== Admin Layout (Sidebar + Content) ====== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--bg2);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 24px;
}

@media (max-width: 1024px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: var(--z-drawer);
    transform: translateX(-100%);
    transition: transform .3s var(--ease-out);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    padding: 16px;
  }
}

/* ====== Sub-page background ====== */
.sub-bg {
  background:
    radial-gradient(1200px 600px at 15% 5%, rgba(110, 168, 255, .16), transparent 60%),
    radial-gradient(900px 520px at 80% 12%, rgba(138, 125, 255, .14), transparent 62%),
    radial-gradient(900px 520px at 45% 95%, rgba(45, 212, 191, .10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #0a0e16 100%);
}
