/*
Theme Name: Apitheth Theme
Theme URI: 
Author: Apitheth
Author URI: 
Description: Premium Dark Magazine style theme for Apitheth
Version: 1.3.1
License: 
License URI: 
Text Domain: apitheth-theme
*/

:root {
  --gold: #ffd700;
  --gold-dark: #ccac00;
  --gold-glow: rgba(255, 215, 0, 0.3);
  --dark-bg: #000000;
  --dark-surface: #0a0a0a;
  --dark-elevated: #1a1a1a;
  --text-main: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.6);
  --font-main: 'Pretendard', system-ui, -apple-system, sans-serif;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --header-height: 80px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: #fff;
  background-color: var(--dark-bg);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode Variables */
body.light-mode {
  --dark-bg: #fafafa;
  --dark-surface: #ffffff;
  --dark-elevated: #f5f5f5;
  --text-main: rgba(0, 0, 0, 0.85);
  --text-muted: rgba(0, 0, 0, 0.55);
  --gold: #c9a227;
  --gold-dark: #a68520;
  --gold-glow: rgba(201, 162, 39, 0.25);
  color: rgba(0, 0, 0, 0.85);
  background-color: #fafafa;
}

body.menu-open {
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------------------------------------------------------------- */
/* Header System */
/* -------------------------------------------------------------------------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  z-index: 2000;
  transition: var(--transition);
}

#site-header.scrolled {
  padding: 16px 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  z-index: 2002;
  display: flex;
  align-items: center;
}

.logo a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5px;
}

.logo img {
  height: 32px;
  width: auto;
  transition: var(--transition);
}

.logo-text {
  font-family: "Gugi", cursive;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -3px;
  color: #fff;
  transition: var(--transition);
  margin-top: 4px;
  /* 폰트 베이스라인 보정 */
}

/* 기본 다크모드: 은색 로고 표시, 검은색 로고 숨김 */
.logo-light {
  display: none;
}

.logo-dark {
  display: block;
}

/* 화이트모드: 검은색 로고 표시, 은색 로고 숨김 */
body.light-mode .logo-light {
  display: block;
}

body.light-mode .logo-dark {
  display: none;
}

body.light-mode .logo-text {
  color: rgba(0, 0, 0, 0.87);
}

.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-btn-info {
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn-logout {
  background: rgba(244, 67, 54, 0.1);
  color: #ff5252 !important;
}

.nav-btn-login {
  background: var(--gold);
  color: #000 !important;
  font-weight: 700;
}

/* Light mode navigation styles */
body.light-mode .nav-link {
  color: rgba(0, 0, 0, 0.75);
}

body.light-mode .nav-link:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.95);
}

body.light-mode .nav-btn-info {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.87);
}

body.light-mode .nav-btn-login {
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  color: #fff !important;
}

body.light-mode #site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.light-mode #site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Hamburger Menu Toggle */

/* Hamburger Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2002;
}

.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: #fff;
  border-radius: 10px;
  transition: var(--transition);
}

body.light-mode .menu-toggle .bar {
  background-color: rgba(0, 0, 0, 0.87);
}

/* -------------------------------------------------------------------------- */
/* Common UI Components */
/* -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 24px;
}

.btn-start,
.btn-premium {
  display: inline-block;
  padding: 18px 48px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 100px;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  border: none;
}

.btn-start {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.btn-start:hover {
  background: #fff;
  color: #000;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-premium {
  background: linear-gradient(90deg, var(--gold), #ff8c00);
  color: #000 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-premium:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(255, 215, 0, 0.4);
}

/* Glassmorphism Overlays */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* Page Specific Sections */
/* -------------------------------------------------------------------------- */

/* Hero Section (Front Page) */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: #000;
}

#bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  padding: 120px 24px 80px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 48px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* Main Content Area */
#primary.site-main {
  position: relative;
  background: var(--dark-bg);
  z-index: 10;
}

.section-padding {
  padding: 120px 0;
}

/* App View */
.app-view-container {
  width: 100%;
  height: 100vh;
  padding-top: var(--header-height);
  background: #000;
  position: relative;
}

.app-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* Pricing & Account Wrappers */
.pricing-wrapper {
  min-height: 100vh;
  padding: 160px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pricing-card-premium {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  padding: 60px 48px;
  max-width: 500px;
  width: 100%;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  margin: 0 auto;
}

.price-tag {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 24px 0;
}

.feature-list {
  list-style: none;
  margin: 40px 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.check-icon {
  color: var(--gold);
}

/* -------------------------------------------------------------------------- */
/* Blog & Single Post System */
/* -------------------------------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 40px;
}

.blog-card {
  height: 100%;
}

.card-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 32px;
  overflow: hidden;
  transition: var(--transition);
}

.card-inner:hover {
  transform: translateY(-12px);
  border-color: var(--gold-glow);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.post-thumbnail {
  height: 260px;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card-inner:hover .post-thumbnail img {
  transform: scale(1.08);
}

/* Magazine Typography (Single.php) */
.magazine-container {
  background: var(--dark-bg);
  color: #fff;
}

.premium-content {
  font-size: 1.25rem;
  line-height: 2.1;
  color: var(--text-main);
  max-width: 800px;
  margin: 0 auto;
}

.premium-content h2 {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 7rem 0 3rem;
  line-height: 1.2;
}

.post-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 100px;
}

/* -------------------------------------------------------------------------- */
/* Footer Section */
/* -------------------------------------------------------------------------- */
#site-footer {
  background: var(--dark-surface);
  padding: 80px 0 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 10;
  letter-spacing: -1px;
}

.footer-info {
  text-align: center;
}

.footer-business-details {
  margin-bottom: 30px;
}

.footer-business-details .address {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 12px;
  font-weight: 500;
}

.footer-info .contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.footer-info .sep {
  opacity: 0.2;
}

.footer-info a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-info a:hover {
  color: var(--gold);
}

.copyright {
  margin-top: 40px;
  font-size: 0.85rem !important;
  opacity: 0.5;
}

/* -------------------------------------------------------------------------- */
/* Light Mode Additional Styles */
/* -------------------------------------------------------------------------- */
body.light-mode #site-footer {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .hero-section {
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
}

body.light-mode .hero-overlay {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, rgba(250, 250, 250, 0.85) 100%);
}

body.light-mode .hero-title {
  color: rgba(0, 0, 0, 0.9);
}

body.light-mode .hero-desc {
  color: rgba(0, 0, 0, 0.7);
}

body.light-mode .badge {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.25);
}

body.light-mode .btn-start {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.85);
}

body.light-mode .btn-start:hover {
  background: #1a1a1a;
  color: #fff;
}

body.light-mode .card-inner {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body.light-mode .card-inner:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(201, 162, 39, 0.3);
}

body.light-mode .pricing-card-premium {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

body.light-mode .service-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
}

/* -------------------------------------------------------------------------- */
/* Responsive Design */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  #site-header {
    padding: 16px 0;
  }

  .theme-toggle {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    z-index: 2001;
    gap: 15px;
    transition: var(--transition);
  }

  .header-nav.active {
    right: 0;
  }

  body.light-mode .header-nav {
    background: rgba(255, 255, 255, 0.98);
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-content {
    padding-top: 140px;
  }

  .pricing-wrapper {
    padding-top: 120px;
  }

  .pricing-card-premium {
    padding: 40px 24px;
  }

  .app-view-container {
    padding-top: 60px;
  }
}

/* -------------------------------------------------------------------------- */
/* Service Section Grid */
/* -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 120px;
  text-align: left;
}

.service-card.web-app {
  grid-column: auto;
}

.web-app-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-card.web-app {
    grid-column: auto;
  }

  .web-app-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* -------------------------------------------------------------------------- */
/* Custom Contact Form */
/* -------------------------------------------------------------------------- */
.custom-contact-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-alert {
  padding: 20px 24px;
  border-radius: 20px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
}

.contact-alert.success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.2);
  color: #81c784;
}

.contact-alert.error {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.2);
  color: #e57373;
}

.apitheth-contact-form .form-group {
  margin-bottom: 28px;
  text-align: left;
}

.apitheth-contact-form label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.apitheth-contact-form input,
.apitheth-contact-form select,
.apitheth-contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: var(--transition);
}

.apitheth-contact-form input::placeholder,
.apitheth-contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.apitheth-contact-form input:focus,
.apitheth-contact-form select:focus,
.apitheth-contact-form textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.1);
}

.apitheth-contact-form select option {
  background: #1a1a1a;
  color: #fff;
}

.apitheth-contact-form textarea {
  resize: vertical;
  line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* Auth Pages (Login & Register) */
/* -------------------------------------------------------------------------- */
.auth-container {
  padding: 20px 24px;
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 10;
}

.auth-form-card {
  max-width: 500px;
  width: 100%;
  padding: 60px 48px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.auth-header {
  text-align: center;
  margin-bottom: 48px;
}

.auth-title {
  font-size: 2.8rem;
  margin-bottom: 16px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
}

.auth-subtitle {
  opacity: 0.7;
  font-size: 1rem;
  color: #eee;
  line-height: 1.6;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  background: #fff;
  color: #000;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
  border: none;
}

.btn-google:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  opacity: 0.2;
}

.auth-divider span {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-input-group {
  margin-bottom: 24px;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.6;
  margin-bottom: 10px;
  margin-left: 10px;
  color: #fff;
  letter-spacing: 0.05em;
}

.auth-input {
  width: 100%;
  padding: 18px 24px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.auth-input:focus {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}

.auth-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.95rem;
}

.auth-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  margin-left: 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 2px;
}

/* -------------------------------------------------------------------------- */
/* Fashion AI Studio                                                          */
/* -------------------------------------------------------------------------- */
.fashion-ai-page {
  min-height: 100vh;
  padding: 120px 24px 80px;
  background: var(--dark-bg);
}

.fashion-ai-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Header Area */
.fai-header-area {
  text-align: center;
  margin-bottom: 48px;
}

.fai-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(255, 215, 0, 0.10);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 24px;
}

.fai-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.fai-title-accent {
  background: linear-gradient(135deg, var(--gold) 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fai-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.8;
}

.fai-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  font-weight: 700;
}

.fai-credit-icon {
  font-size: 1.1rem;
}

#fai-credit-count {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 800;
}

.fai-credit-label {
  opacity: 0.5;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Toolbar */
.fai-toolbar {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
}

.fai-toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fai-toolbar-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
}

.fai-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fai-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fai-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.fai-toggle-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fai-toggle-btn svg {
  width: 14px;
  height: 14px;
}

/* Upload Section */
.fai-upload-section {
  margin-bottom: 32px;
}

.fai-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.fai-section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.fai-upload-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.fai-upload-slot {
  position: relative;
}

.fai-file-input {
  display: none;
}

.fai-slot-inner {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  background: rgba(255, 255, 255, 0.02);
}

.fai-slot-inner:hover {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.03);
}

.fai-slot-inner.has-image {
  border: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--gold), 0 12px 32px rgba(0, 0, 0, 0.4);
}

.fai-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 16px;
  text-align: center;
}

.fai-slot-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.fai-slot-inner:hover .fai-slot-icon {
  color: var(--gold);
  transform: scale(1.1);
}

.fai-slot-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.fai-slot-hint {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.fai-slot-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Image Preview */
.fai-slot-preview {
  position: relative;
  width: 100%;
  height: 100%;
}

.fai-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fai-slot-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(2px);
}

.fai-slot-inner:hover .fai-slot-overlay {
  opacity: 1;
}

.fai-slot-clear {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.fai-slot-clear:hover {
  background: #ef4444;
  transform: scale(1.1);
}

/* Info Card */
.fai-info-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 32px;
}

.fai-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  flex-shrink: 0;
}

.fai-info-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.fai-ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.fai-ratio-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fai-ratio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fai-ratio-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.35);
}

.fai-ratio-value {
  font-size: 0.82rem;
  font-weight: 800;
}

.fai-ratio-bar {
  height: 4px;
  border-radius: 2px;
  width: 100%;
}

.fai-ratio-main {
  background: #f1f5f9;
}

.fai-ratio-base {
  background: #94a3b8;
}

.fai-ratio-point {
  background: #6366f1;
}

/* Generate Button */
.fai-generate-area {
  text-align: center;
  margin-bottom: 48px;
}

.fai-generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  padding: 18px 32px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gold), #ff8c00);
  color: #000;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 12px 32px rgba(255, 215, 0, 0.25);
}

.fai-generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 215, 0, 0.35);
}

.fai-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.fai-generate-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.6;
}

/* Loading Overlay */
.fai-loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}

.fai-loading-inner {
  text-align: center;
  max-width: 320px;
}

.fai-spinner-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 28px;
}

.fai-spinner {
  width: 80px;
  height: 80px;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: fai-spin 1s linear infinite;
}

.fai-spinner-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  animation: fai-pulse 2s ease-in-out infinite;
}

@keyframes fai-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fai-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.fai-spin {
  animation: fai-spin 1s linear infinite;
}

.fai-loading-text {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.fai-loading-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.fai-progress-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}

.fai-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  width: 0%;
  transition: width 2s linear;
}

/* Error */
.fai-error-area {
  text-align: center;
  padding: 40px;
}

.fai-error-inner {
  max-width: 400px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 24px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.fai-error-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.fai-error-text {
  font-size: 0.95rem;
  color: #fca5a5;
  font-weight: 600;
  margin-bottom: 16px;
}

.fai-error-retry {
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  background: transparent;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.fai-error-retry:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Result Section */
.fai-result-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fai-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.fai-result-card {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.fai-result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 215, 0, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.fai-result-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
}

.fai-result-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fai-result-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fai-download-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.fai-result-card:hover .fai-download-btn {
  opacity: 1;
  transform: translateY(0);
}

.fai-download-btn:hover {
  transform: scale(1.15);
  background: #fff;
}

/* Result Error */
.fai-result-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  min-height: 200px;
}

.fai-result-error-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.fai-result-error p {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.fai-result-error span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Stylist Note */
.fai-stylist-note {
  margin-top: 24px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fai-note-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.fai-note-text {
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  white-space: pre-wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .fashion-ai-page {
    padding-top: 100px;
  }

  .fai-upload-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .fai-result-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .fai-toolbar {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .fai-ratio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .fai-upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}