* { box-sizing: border-box; }

:root {
  --bg: #111216;
  --bg-soft: #181a20;
  --card: #1b1d23;
  --card-2: #20232b;
  --text: #f3f4f6;
  --text-soft: #b6bcc8;
  --line: #2d313a;

  --primary: #c81921;
  --primary-dark: #8b151c;
  --primary-soft: #e4585f;

  --input-bg: #14161b;
  --input-border: #343944;
  --topbar: rgba(10, 10, 12, 0.88);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

body.light-mode {
  --bg: #f4f5f8;
  --bg-soft: #eef0f4;
  --card: #ffffff;
  --card-2: #ffffff;
  --text: #151821;
  --text-soft: #5d6675;
  --line: #dde2ea;

  --primary: #c81921;
  --primary-dark: #8b151c;
  --primary-soft: #e4585f;

  --input-bg: #ffffff;
  --input-border: #ccd4df;
  --topbar: rgba(255, 255, 255, 0.92);
  --shadow: 0 10px 28px rgba(19, 28, 45, 0.08);
}

body {
  margin: 0;
  font-family: "Noto Sans KR", Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(200, 25, 33, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
}

.topbar {
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.brand {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav a {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-soft);
}

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

.section {
  padding: 36px 0;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--text);
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.quick-link {
  display: block;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 25, 33, 0.6);
  box-shadow: 0 16px 34px rgba(200, 25, 33, 0.14);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 32px;
  color: var(--text);
  text-align: center;
}

.login-card p {
  margin: 0 0 20px;
  color: var(--text-soft);
  text-align: center;
}

.login-logo {
  text-align: center;
  margin-bottom: 18px;
}

.login-logo img {
  width: 120px;
  max-width: 100%;
  height: auto;
  display: inline-block;
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  outline: none;
  margin-bottom: 14px;
  background: var(--input-bg);
  color: var(--text);
}

.input::placeholder,
textarea.input::placeholder {
  color: #8a92a3;
}

.input:focus,
select.input:focus,
textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(200, 25, 33, 0.12);
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.error {
  background: rgba(200, 25, 33, 0.12);
  color: #ffb6ba;
  border: 1px solid rgba(200, 25, 33, 0.32);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0c10;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: rgba(200, 25, 33, 0.55);
}

@media (max-width: 768px) {
  .nav {
    gap: 8px;
  }

  .nav a {
    display: none;
  }

  .section-title {
    font-size: 24px;
  }

  .brand-logo img {
    width: 32px;
    height: 32px;
  }

  .login-card {
    padding: 26px;
  }
}