/* Modern Dark-mode Glassmorphism Design System */
:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(22, 29, 47, 0.7);
  --bg-card-hover: rgba(30, 41, 67, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --primary: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --secondary-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --accent-gold: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background Ambient Glows */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: -1;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0) 70%);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  bottom: 10%;
  right: -150px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: rgba(11, 15, 25, 0.8);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
}

.brand-icon {
  font-size: 1.5rem;
}

.badge {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 50px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  font-size: 0.85rem;
  color: #a5b4fc;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.25;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 36px;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 16px 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-color);
  margin: 0 30px;
}

/* Main Content Grid */
.content-section {
  padding: 40px 0 80px;
}

.main-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 32px;
  align-items: start;
}

/* Card Common */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-card);
}

.card-header {
  margin-bottom: 24px;
}

.step-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Form Styles */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.help-link {
  font-size: 0.8rem;
  color: #38bdf8;
  text-decoration: none;
}

.input-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Chip selection */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.chip.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.5);
}

.alert-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-top: 10px;
}

.alert-message.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.hidden {
  display: none !important;
}

/* Browse Section */
.browse-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.browse-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.search-box input {
  width: 260px;
  font-size: 0.88rem;
  padding: 10px 14px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Benefit Cards */
.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.benefit-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.benefit-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-card);
}

.benefit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dept-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.deadline-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.benefit-item-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
}

.briefing-box {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.brief-tag {
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.85rem;
}

.brief-tag.target { color: #a78bfa; }
.brief-tag.money { color: #34d399; }
.brief-tag.date { color: #f59e0b; }

.benefit-card-bottom {
  display: flex;
  justify-content: flex-end;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: #161d2f;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.guide-steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.guide-steps code {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-note {
  margin-top: 6px;
  font-size: 0.78rem;
}

/* Responsive */
@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .browse-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-box input {
    width: 100%;
  }
  .hero-title {
    font-size: 2.1rem;
  }
}
