:root {
  --bg-color: #0a0a0a;
  --text-color: #ffffff;
  --text-muted: #888888;
  --accent-color: #b026ff;
  --accent-secondary: #4c6ef5;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Outfit', sans-serif;
  --font-kr: 'Noto Sans KR', sans-serif;
  --container-width: 1200px;
  --header-height: 80px;
  --transition-speed: 0.4s;
  /* Smoother transitions */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Cursor Glow */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(176, 38, 255, 0.15), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

/* Background & Canvas */
#bg-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
  /* Fix: Prevent Blocking */
}

#floating-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Fix: Prevent Blocking */
}

.float-box {
  position: absolute;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  backdrop-filter: blur(1px);
  opacity: 0;
  transition: opacity 0.5s, background 0.3s, border-color 0.3s;
  animation: float-box 10s ease-in-out infinite;
}

/* Mouse Light Reveal Effect */
#bg-wrap::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(176, 38, 255, 0.08),
      transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.float-box.revealed {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(176, 38, 255, 0.3);
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.1);
}

@keyframes float-box {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(10px, -10px);
  }

  50% {
    transform: translate(-5px, 10px);
  }

  75% {
    transform: translate(-10px, -5px);
  }
}

/* Header */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-speed), backdrop-filter var(--transition-speed);
}

#site-header.scrolled {
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

#site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

nav ul {
  display: flex;
  gap: 40px;
}

nav a {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

nav a:hover {
  opacity: 1;
  color: var(--accent-color);
}

/* Hamburger Menu default hidden */
.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #fff;
}

/* Sections */
section {
  padding: 120px 0;
  position: relative;
  z-index: 10;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 60px;
  background: linear-gradient(to right, #fff, #aaa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  /* Tighter for premium look */
}

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content {
  flex: 1;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.logo-circle-img {
  width: 100%;
  max-width: 500px;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 30px rgba(176, 38, 255, 0.4));
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.overline {
  color: var(--accent-color);
  font-weight: 600;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

h1 {
  font-size: 5rem;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 30px;
  letter-spacing: -0.04em;
  /* Premium tight spacing */
}

.subtitle {
  font-family: var(--font-kr);
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 15px;
}

.btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: white;
  color: black;
  font-weight: 700;
  border-radius: 50px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  background: transparent;
  color: white;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: rgba(176, 38, 255, 0.1);
  transform: translateY(-2px);
}

/* Glass Cards */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(176, 38, 255, 0.05), transparent 70%);
  pointer-events: none;
}

/* Grid System */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  padding: 40px 30px;
  transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(176, 38, 255, 0.5);
  box-shadow: 0 10px 30px rgba(176, 38, 255, 0.15);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.card p {
  font-family: var(--font-kr);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Card Background Image */
.card[data-bg-img] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card[data-bg-img]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.card[data-bg-img] h3,
.card[data-bg-img] p {
  position: relative;
  z-index: 2;
}

/* Step Background Image */
.step-item[data-bg-img] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.step-item[data-bg-img]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.step-item[data-bg-img] h4,
.step-item[data-bg-img] p,
.step-item[data-bg-img] a,
.step-item[data-bg-img] span,
.step-item[data-bg-img] .step-num {
  position: relative;
  z-index: 2;
}

/* Services List */
.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: flex;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--glass-border);
  transition: background-color 0.3s;
}

.service-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.service-item .num {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-right: 40px;
  font-family: monospace;
}

.service-item h3 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  transition: transform 0.3s;
}

.service-item:hover h3 {
  transform: translateX(20px);
  color: var(--accent-color);
}

.service-item p {
  color: var(--text-muted);
}

/* Contact Refined */
#contact {
  text-align: center;
}

.contact-header {
  margin-bottom: 60px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 80px;
}

.contact-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  padding: 50px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, border-color 0.3s;
  text-decoration: none;
  /* Added for anchor tag compatibility */
  cursor: pointer;
}

.contact-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.03);
}

.icon-box {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--accent-color);
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #fff;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Social Section */
.social-section p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-btn {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.social-btn:hover {
  background: rgba(176, 38, 255, 0.1);
  color: #fff;
  border-color: var(--accent-color);
  transform: translateY(-5px);
}

.social-img-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.55;
  /* Matches var(--text-muted) #888 visual weight */
  transition: opacity 0.3s, filter 0.3s;
  filter: grayscale(100%);
  /* Ensure no color if original has it */
}

.social-btn:hover .social-img-icon {
  opacity: 1;
  filter: grayscale(0%) brightness(100%);
}


/* Service Detail Link */
.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: gap 0.3s;
}

.detail-link:hover {
  gap: 10px;
  text-decoration: underline;
}

/* Portfolio Modal (CMS Grid) */
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: flex-start;
  /* Align top for scrolling */
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 60px 20px;
}

.portfolio-modal.active {
  display: flex !important;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: transparent;
  box-shadow: none;
  transform: none;
  margin: auto;
}

.modal-header {
  text-align: center;
  margin-bottom: 50px;
}

.modal-header h2 {
  font-size: 3rem;
  background: linear-gradient(to right, #fff, var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Modal Close Button */
.modal-close {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2001;
  transition: all 0.3s;
}

.modal-close:hover {
  background: var(--accent-color);
  transform: rotate(90deg);
}

/* Portfolio Grid System */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  width: 100%;
  padding-bottom: 60px;
}

.portfolio-item {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(176, 38, 255, 0.2);
}

.portfolio-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.portfolio-item:hover .portfolio-media {
  transform: scale(1.1);
}

.item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 2;
}

.portfolio-item:hover .item-overlay {
  transform: translateY(0);
}

.item-overlay h4 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.item-overlay p {
  color: var(--accent-color);
  font-size: 0.9rem;
}

/* Lightbox Mode */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.98);
  z-index: 3000;
  display: none;
  /* Use block + auto margins for scrolling capability */
  overflow-y: auto;
  padding: 60px 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.lightbox-overlay.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Start from top to allow scrolling down */
  opacity: 1;
  /* Ensure opacity becomes 1 */
  z-index: 9999;
  /* Force top */
}

.lightbox-img-wrapper {
  width: auto;
  max-width: 1200px;
  /* 1200px limit as requested */
  margin: auto;
  position: relative;
}

.lightbox-img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 0 50px rgba(176, 38, 255, 0.15);
}

.lightbox-text {
  margin-top: 20px;
  text-align: center;
  color: #fff;
}

.lightbox-close {
  position: fixed;
  /* Fix to viewport */
  z-index: 10000;
  /* Ensure on top of image */
  top: 30px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent-color);
}

/* Footer & Responsive */
footer {
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 80px;
  background: rgba(0, 0, 0, 0.2);
}

footer .container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.footer-links {
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  font-family: var(--font-kr);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-links span {
  color: rgba(255, 255, 255, 0.1);
}

.footer-info {
  margin-bottom: 25px;
  line-height: 1.8;
  font-family: var(--font-kr);
  color: rgba(255, 255, 255, 0.4);
}

.footer-info p {
  margin-bottom: 5px;
  word-break: keep-all;
}

.footer-copyright {
  font-size: 0.8rem;
  opacity: 0.3;
  letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
  :root {
    --container-width: 90%;
    --header-height: 60px;
    /* Adjust header height for tablet/mobile */
  }

  h1 {
    font-size: 4rem;
  }

  /* Core Values: stack to 1 column as requested */
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* --- Mobile/Tablet Navigation (Hamburger) --- */
  #site-header .container {
    padding: 0 20px;
  }

  .hamburger {
    display: block;
    position: relative;
    z-index: 101;
  }

  /* Hamburger Animation */
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Nav Menu Overlay */
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    gap: 0;
    flex-direction: column;
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 90;
    padding-top: 60px;
  }

  .nav-menu.active {
    left: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 40px;
  }

  nav a {
    font-size: 1.5rem;
    font-weight: 700;
  }
}

@media (max-width: 768px) {
  /* Inherit styles from 1024px */

  /* Hero Mobile */
  #hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 30px;
  }

  .hero-visual {
    width: 100%;
  }

  .logo-circle-img {
    max-width: 300px;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-btns {
    justify-content: center;
  }

  /* Contact Grid Mobile */
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Work Process Steps */
.work-process {
  margin-top: 100px;
}

.process-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 20px;
}

/* Connecting Line Removed */

.step-item {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  /* Glass card look for steps */
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 15px;
  /* Increased top/bottom padding */
  border-radius: 0;
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
  min-height: 220px;
  /* Slightly taller to accommodate */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Align to top */
  align-items: center;
}

.step-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.03);
}

.step-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 20px;
  /* More space */
  opacity: 1;
  font-family: monospace;
}

.step-item h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 700;
  text-align: center;
  /* Center align title */
  line-height: 1.3;
  min-height: 2.6em;
  /* Reserve space for 2 lines */
  display: flex;
  align-items: flex-start;
  /* Align text to top of box if needed, or center? Center likely looks better if 1 line vs 2 lines, but for 'p' alignment below, top is safer. Let's keep normal flow. */
  justify-content: center;
}

.step-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-kr);
  margin: 0;
  text-align: center;
  /* Center align text */
  word-break: keep-all;
  line-height: 1.4;
}

.step-item a {
  color: var(--accent-color);
  opacity: 1;
}

/* Responsive Work Process */
@media (max-width: 1024px) {
  .process-steps {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .step-arrow {
    display: none;
  }

  .step-item {
    min-width: 140px;
    flex: 0 0 calc(33.33% - 15px);
  }
}

@media (max-width: 768px) {
  .work-process {
    margin-top: 60px;
  }

  .step-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    text-align: left;
    align-items: center;
    padding: 15px 20px;
    min-height: auto;
    gap: 0 15px;
    /* Force 2 columns on tablet/large mobile */
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }

  .step-num {
    grid-row: 1 / span 2;
    margin-right: 0;
    margin-bottom: 0;
    font-size: 1.5rem;
    width: auto;
  }

  .step-item h4 {
    margin: 0;
    font-size: 1rem;
    align-self: end;
  }

  .step-item p {
    margin: 0;
    align-self: start;
    word-break: keep-all;
    /* Revert aggressive break, prioritize width */
    overflow-wrap: break-word;
    /* Safe break */
  }
}

@media (max-width: 480px) {
  .step-item {
    /* Force 1 column on small mobile */
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* --- Refined Auth Modal Styles --- */

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  /* Slightly darker backdrop */
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  /* Global Safety Fix */
}

.auth-modal.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  /* Re-enable */
}

.auth-wrapper {
  background: #1a1a1a;
  border: 1px solid #333;
  width: 100%;
  max-width: 420px;
  border-radius: 4px;
  overflow-y: auto !important;
  /* Allow internal scrolling */
  position: relative;
  max-height: 95vh !important;
  /* Increase limit slightly */
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 2rem;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
}

.auth-close:hover {
  color: #fff;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: #fff;
  /* White background for tabs as per image? No, image had white tabs but site is dark. Let's do dark-grey. */
  background: #111;
  border-bottom: 2px solid #333;
}

.auth-tab {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: color 0.3s;
}

.auth-tab.active {
  color: #fff;
  border-bottom: 2px solid #fff;
  /* White underline for active tab */
  margin-bottom: -2px;
  /* Overlap border */
}

/* Content Area */
.auth-content {
  display: none;
  padding: 20px 24px 30px 24px;
  /* Reduced top padding */
  background: #eee;
  /* Light gray background like image? Image was light. */
  /* User said: "Keep the capture image's black background and neon purple point color" */
  /* So I will ignore the image's light theme and stick to dark */
  background: #1a1a1a;
}

.auth-content.active {
  display: block;
}

/* Input Group with Icons */
.auth-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Reduced gap */
  margin-bottom: 20px;
  /* Reduced margin */
}

.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #888;
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 2;
}

.input-icon-group input {
  width: 100%;
  padding: 14px 14px 14px 48px;
  /* Space for icon */
  background: #252525;
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s;
}

.input-icon-group input::placeholder {
  color: #666;
}

.input-icon-group input:focus {
  border-color: var(--accent-color);
  background: #2a2a2a;
  box-shadow: 0 0 0 2px rgba(176, 38, 255, 0.1);
}

.input-icon-group input:focus+.input-icon,
.input-icon-group:focus-within .input-icon {
  color: var(--accent-color);
}

/* Row for Phone + Verify Button */
.input-group-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.btn-verify {
  height: 48px;
  /* Match input height roughly */
  padding: 0 15px;
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.btn-verify:hover {
  background: var(--accent-color);
  color: #fff;
}

#sms-verify-area {
  display: flex;
  gap: 10px;
}

.btn-verify-confirm {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 38px;
  padding: 0 15px;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-verify-confirm:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.auth-msg {
  font-size: 0.8rem;
  margin-top: 5px;
  margin-left: 5px;
  min-height: 1.2em;
}

.auth-msg.success {
  color: #4caf50;
  /* Green */
}

.auth-msg.error {
  color: #ff4d4d;
  /* Red */
}

/* Terms Checkbox */
.terms-box {
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #aaa;
  background: #222;
  padding: 12px;
  border-radius: 4px;
}

.terms-text {
  height: 100px;
  overflow-y: auto;
  background: #151515;
  padding: 8px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: #777;
  border: 1px solid #333;
}

.terms-text p {
  margin-bottom: 8px;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.terms-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-color);
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent-color);
  /* Neon purple default */
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .auth-wrapper {
    width: 95%;
  }
}

/* Online Class / Lecture Section Styles */
.lecture-container {
  padding-top: 50px;
  padding-bottom: 100px;
}

.subject-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 120px;
}

.tab-btn {
  padding: 12px 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(176, 38, 255, 0.3);
}

.lecture-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.lecture-section.active {
  display: block;
}

.sub-section-title {
  font-size: 1.5rem;
  margin: 80px 0 20px 0;
  /* Doubled top margin */
  padding-left: 15px;
  border-left: 4px solid var(--accent-color);
  color: #fff;
}

.lecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 100px;
  /* Doubled bottom margin */
}

.lecture-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

/* Random placeholder thumbnail gradient */
.lecture-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-color), var(--accent-secondary));
  opacity: 0.7;
}

.lecture-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lecture-num {
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lecture-card h4 {
  font-size: 1.2rem;
  line-height: 1.4;
  color: #fff;
  margin: 0;
}

/* Mobile Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  z-index: 2000;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 5px auto;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    z-index: 1500;
    padding-top: 80px;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }
}

/* --- Coupon Notification Popup --- */
.coupon-notif-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.coupon-notif-overlay.active {
  opacity: 1;
  visibility: visible;
}

.coupon-notif-card {
  background: #111;
  border: 1px solid var(--accent-color);
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(176, 38, 255, 0.2);
}

.coupon-notif-overlay.active .coupon-notif-card {
  transform: scale(1) translateY(0);
}

.coupon-notif-icon {
  font-size: 3.5rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: block;
  animation: pulse-accent 2s infinite;
}

@keyframes pulse-accent {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(176, 38, 255, 0));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(176, 38, 255, 0.4));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(176, 38, 255, 0));
  }
}

.coupon-notif-card h2 {
  font-family: var(--font-kr);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.4;
  word-break: keep-all;
}

.coupon-notif-card p {
  font-family: var(--font-kr);
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 30px;
}

.coupon-notif-btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.coupon-notif-btn:hover {
  background: #fff;
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.coupon-notif-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.coupon-notif-close:hover {
  color: #fff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Hero Banner Slider (Coloso Style)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#hero-banner {
  padding: 0;
  position: relative;
  z-index: 10;
}

.hb-slider {
  position: relative;
  width: 100%;
  max-height: 560px;
  overflow: hidden;
  background: #000;
}

.hb-slides {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  height: 100%;
}

.hb-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.hb-slide img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  display: block;
}

.hb-slide iframe {
  width: 100%;
  height: 560px;
  border: 0;
  pointer-events: none;
}

.hb-slide .hb-click-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  cursor: pointer;
}

/* Navigation Arrows */
.hb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 5;
  transition: 0.3s;
  opacity: 0;
}

.hb-slider:hover .hb-nav {
  opacity: 1;
}

.hb-nav:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(176, 38, 255, 0.6);
}

.hb-prev {
  left: 20px;
}

.hb-next {
  right: 20px;
}

/* Controls Bar */
.hb-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 5;
  background: none;
  padding: 0;
  border-radius: 0;
  border: none;
}

/* Dot Indicators */
.hb-indicators {
  display: flex;
  gap: 16px;
}

.hb-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: 0.3s;
}

.hb-dot.active {
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

/* Counter */
.hb-counter {
  display: none;
}

/* Sound Button */
.hb-sound-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px;
  transition: 0.2s;
}

.hb-sound-btn:hover {
  color: #fff;
}

/* Progress Bar */
.hb-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 6;
}

.hb-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--accent-color), #c359ff);
  width: 0%;
  transition: width 0.1s linear;
  opacity: 0.4;
}

.hb-progress-bar.animate {
  transition: width linear;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hb-slider {
    max-height: 280px;
  }

  .hb-slide img,
  .hb-slide iframe {
    height: 280px;
  }

  .hb-nav {
    display: none;
  }

  .hb-controls {
    gap: 10px;
    bottom: 10px;
  }

  .hb-counter {
    font-size: 0.45rem;
  }

  .hb-dot {
    width: 2px;
    height: 2px;
  }

  .hb-text-title {
    font-size: 1.2rem;
  }

  .hb-text-subtitle {
    font-size: 0.85rem;
  }

  .hb-text-overlay {
    padding: 20px 25px;
    max-width: 100%;
  }

  .hb-text-title,
  .hb-text-subtitle {
    white-space: nowrap;
  }

  .hb-pos-bottom-left,
  .hb-pos-bottom-center,
  .hb-pos-bottom-right {
    bottom: 20px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Text Overlay on Banner Slides
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hb-text-overlay {
  position: absolute;
  z-index: 3;
  padding: 45px 60px;
  pointer-events: none;
  max-width: 100%;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.hb-text-title {
  margin: 0 0 8px;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hb-text-subtitle {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.5;
}

/* 9 Preset Positions */
.hb-pos-top-left {
  top: 0;
  left: 0;
}

.hb-pos-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.hb-pos-top-right {
  top: 0;
  right: 0;
  text-align: right;
}

.hb-pos-center-left {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.hb-pos-center-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.hb-pos-center-right {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  text-align: right;
}

.hb-pos-bottom-left {
  bottom: 60px;
  left: 0;
}

.hb-pos-bottom-center {
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.hb-pos-bottom-right {
  bottom: 60px;
  right: 0;
  text-align: right;
}
/*  Follow Me On Section  */
.follow-me-section {
  padding: 80px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #0a0a0a;
  text-align: center;
}
.follow-me-title {
  color: rgba(255,255,255,0.5);
  margin: 0 0 25px 0;
  font-size: 0.9rem;
  letter-spacing: 1px;
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
}
.follow-me-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}
.follow-me-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s;
  text-decoration: none;
}
.follow-me-icon:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255,255,255,0.9);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.follow-me-icon img {
  max-height: 22px;
  width: auto;
  opacity: 0.6;
  display: block;
  transition: opacity 0.3s;
}
.follow-me-icon:hover img {
  opacity: 1;
}
/* Fix: Override page-specific .container flex layout inside Follow me on section */
.follow-me-section .container {
  display: block;
  text-align: center;
}