@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;700&display=swap');

:root {
  /* Brand / mood colors */
  --color-bg: #08041A;
  --color-bg-alt: #0E0A23;
  --color-bg-card: #141028;

  --color-primary: #9B3DFF;     /* vivid violet */
  --color-secondary: #F5A623;   /* golden accent */
  --color-accent: #1AE0FF;

  /* Text & UI */
  --color-text: #EDE8FF;          /* soft lavender body text (dark bg guaranteed) */
  --color-text-muted: #A0A0C0;     /* muted text */
  --color-text-on-primary: #F2F2F2; /* contrast for light primary; primary used is light enough per palette */

  --color-border: #2A174A;
  --color-shadow: rgba(0,0,0,0.4);

  /* Typography scale (mandatory) */
  --font-family-sans: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base:  1rem;
  --font-size-md:   1.125rem;
  --font-size-lg:   1.25rem;
  --font-size-xl:   1.5rem;
  --font-size-2xl:  2rem;
  --font-size-3xl:  2.75rem;
  --font-size-hero: 3.5rem;

  --line-height-tight: 1.2;
  --line-height-base:  1.6;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold:   700;

  /* Radius / shapes */
  --radius: 12px;
}

/* Global reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
html, body {
  font-family: var(--font-family-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* mandatory per responsive 요구사항 */
}
img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul, li {
  padding: 0;
  margin: 0;
  list-style: none;
}
.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* CENTER content at all breakpoints (required) */
}
.section {
  padding: 2rem 0;
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 0.5rem;
  color: var(--color-text);
}
.hero {
  position: relative;
  display: block;
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, rgba(9,2,40,0.95) 0%, rgba(8,4,26,0.95) 60%), var(--color-bg;
  );
  background: linear-gradient(135deg, rgba(8,4,26,0.95) 0%, rgba(8,4,26,0.85) 60%), #08041A;
  /* dark gradient with neon feel */
  min-height: 50vh;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}
.hero-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.hero-spotlight { flex: 0 0 auto; }
.hero-spotlight-ring {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 6px solid var(--color-primary);
  box-shadow: 0 0 40px color-mix(in srgb, var(--color-primary) 30%, transparent);
  overflow: hidden;
}
.hero-spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-text { flex: 1; padding: 0 0.5rem; }
.hero-badge {
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: .5px;
  margin: 0.75rem 0;
}
.hero-cta { display:flex; gap:1rem; flex-wrap:wrap; margin-top:1rem; }
.hero h1 {
  font-size: var(--font-size-hero);
  line-height: var(--line-height-tight);
  margin: 0 0 0.25rem;
  color: #fff;
}
.hero p {
  font-size: var(--font-size-base);
  color: #f3eaff;
  margin: 0;
}
.btn, .btn-primary, .btn-secondary {
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: 0.85rem 1.15rem;
  font-size: var(--font-size-sm);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn:hover {
  text-decoration: none;
  opacity: 0.95;
}
.hero-inner .hero-spotlight { position: relative; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  min-height: 64px;
  overflow: visible;
  background: rgba(8,4,26,0.92);
  backdrop-filter: saturate(1.2) blur(2px);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  margin: 0 auto; /* center across breakpoints */
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory white bars */
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.nav-list {
  display: flex;
  flex-direction: column; /* mobile: vertical by default per spec */
  gap: 0;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
}
.nav-item { }

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #fff;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--color-primary);
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
  color: var(--color-text);
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}

.site-nav {
  /* Tablet/Desktop open layout */
}
@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-centered */
  .site-header .container {
    justify-content: flex-start;
  }
  .site-nav {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  .nav-toggle-label {
    display: none;
  }
  .nav-list {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
  }
  .nav-link {
    font-size: var(--font-size-sm);
  }
  /* Dropdown on desktop remains, keep hover/focus behavior */
  .hero { min-height: 60vh; }
}
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }
  .section { padding: 4rem 0; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
}

@media (max-width: 767px) {
  html, body {
    overflow-x: hidden;
  }
  .container {
    padding: 0 1rem;
  }
  .site-header .container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
  }
  /* Mobile specific nav behavior from system prompt */
  .nav-list { flex-direction: column; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-spotlight-ring { width: 200px; height: 200px; }
  .hero-cta { justify-content: center; }
  .nav-link { font-size: var(--font-size-xs); padding: 0.75rem 1rem; }
  .nav-link::after { display: none; } /* decorative underline not required on mobile */
  .badge { display: inline-block; }
  .card-grid { grid-template-columns: 1fr; }
  .card { width: 100%; }
  .footer-inner { text-align: center; padding: 1rem 0; }
  table { display: block; overflow-x: auto; width: 100%; }
}
@media (min-width: 768px) {
  /* Tablet adjustments for typography in nav */
  .nav-link { font-size: var(--font-size-sm); }
  .container { margin: 0 auto; }
}
@media (min-width: 1024px) {
  /* Desktop specific sizing already included; ensure container centering remains */
  .container { margin: 0 auto; }
}

/* Card system */
.card {
  display: flex;
  flex-direction: column; /* mandatory layout direction */
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(155,61,255,0.14), rgba(244, 217, 255, 0.08));
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  color: var(--color-text);
  box-shadow: 0 0 20px rgba(155,61,255,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 28px rgba(155,61,255,0.32);
}
.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content {
  padding: 1rem;
}
.card h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 .25rem;
  color: var(--color-text);
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  line-height: 1.5;
}
.card-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Forms */
label {
  display: block;
  font-size: var(--font-size-xs);
  margin-bottom: 0.25rem;
  color: var(--color-text);
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.04);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(155,61,255,0.15);
}
button[type="submit"] {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  border: none;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: filter 0.2s ease;
}
button[type="submit"]:hover {
  filter: brightness(0.95);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-card);
}
th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
th {
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
td {
  color: var(--color-text-muted);
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none !important; }