@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  --font-primary: 'Outfit', 'Noto Sans KR', sans-serif;
  
  /* Color Palette - Premium Dark Mode */
  --bg-main: #0B0F19;
  --bg-card: rgba(22, 28, 45, 0.6);
  --bg-card-hover: rgba(30, 39, 62, 0.8);
  --bg-input: rgba(13, 18, 30, 0.8);
  
  --primary: #3B82F6; /* Sapphire Blue */
  --primary-glow: rgba(59, 130, 246, 0.15);
  --secondary: #10B981; /* Emerald/Teal */
  --accent: #F59E0B; /* Amber/Gold */
  
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(59, 130, 246, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 50px rgba(0, 0, 0, 0.5);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- Glassmorphism & UI Utilities --- */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.glass-premium {
  background: linear-gradient(135deg, rgba(22, 28, 45, 0.7) 0%, rgba(13, 18, 30, 0.8) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.text-gradient {
  background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 50%, #1D4ED8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo span {
  color: var(--primary);
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

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

.btn-nav {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--primary);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
}

.btn-nav:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* --- Main Layout --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* --- Card Styles --- */
.card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.card-img-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: #111827;
  overflow: hidden;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.card:hover .card-img-container img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(5px);
  color: white;
}

.card-badge.premium {
  background: rgba(245, 158, 11, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.card-badge.regular {
  background: rgba(59, 130, 246, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.card-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

/* --- Forms & Inputs --- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-field {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.select-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #2563EB;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.btn-accent {
  background: var(--accent);
  color: #000;
}

.btn-accent:hover {
  background: #D97706;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

/* --- Toast Notification --- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
}

.toast.success {
  background: rgba(16, 185, 129, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.toast.info {
  background: rgba(59, 130, 246, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.5);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- Grid Systems --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  header {
    flex-direction: column;
    gap: 1rem;
  }
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}
