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

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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --dark-bg: #0f172a;
  --dark-card: #1e293b;
  --light-bg: #f8fafc;
  --light-card: #ffffff;
  --text-dark: #f1f5f9;
  --text-light: #1e293b;
  --text-muted: #94a3b8;
  --gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 60px -20px rgba(99, 102, 241, 0.4);
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

body.light {
  background-color: var(--light-bg);
  color: var(--text-light);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light .navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: #fff;
}

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

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
}

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

.theme-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.contact-btn-nav {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

header {
  padding: 150px 20px 80px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
}

header h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

header .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

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

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.group-card {
  background: var(--dark-card);
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light .group-card {
  background: var(--light-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.group-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-hover);
}

.group-card .image-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-card .group-icon {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.group-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.group-card:hover img {
  transform: scale(1.08);
}

.group-card .group-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.group-card .group-info {
  padding: 24px;
}

.group-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

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

.group-card .member-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

#membersPage {
  padding-top: 100px;
}

#backBtn {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 14px 28px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 40px;
  transition: all 0.3s;
}

#backBtn:hover {
  background: var(--primary);
  color: #fff;
}

#groupTitle {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  text-align: center;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.member-card {
  background: var(--dark-card);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light .member-card {
  background: var(--light-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.member-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.member-card .member-avatar {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-card .member-avatar span {
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.member-card .member-info {
  padding: 20px;
  text-align: center;
}

.member-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.member-card .role {
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: var(--dark-card);
  border-radius: 28px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: modalOpen 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light .modal-content {
  background: var(--light-card);
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content img {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
}

.modal-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-content .modal-role {
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 16px;
}

.modal-content p {
  color: var(--text-muted);
  line-height: 1.7;
}

#closeModal, #closeContact {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
}

#closeModal:hover, #closeContact:hover {
  color: #fff;
}

body.light #closeModal:hover, 
body.light #closeContact:hover {
  color: var(--text-light);
}

.contact-modal {
  max-width: 480px;
}

.contact-modal h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.contact-modal form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-modal input,
.contact-modal textarea {
  padding: 16px 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}

body.light .contact-modal input,
body.light .contact-modal textarea {
  background: var(--light-bg);
  color: var(--text-light);
  border-color: rgba(0, 0, 0, 0.1);
}

.contact-modal input:focus,
.contact-modal textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-modal textarea {
  min-height: 140px;
  resize: vertical;
}

.submit-btn {
  padding: 16px 32px;
  border: none;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.hidden {
  display: none !important;
}

footer {
  background: var(--dark-card);
  padding: 60px 40px 30px;
  margin-top: 80px;
}

body.light footer {
  background: var(--light-card);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light .footer-content {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

body.light .footer-links h4,
body.light .footer-contact h4 {
  color: var(--text-light);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.3s;
}

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

.footer-contact p,
.footer-contact a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  display: block;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 25px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.content-page {
  max-width: 900px;
  margin: 120px auto 60px;
  padding: 0 40px;
}

.content-page h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 40px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-page section {
  margin-bottom: 48px;
  padding: 32px;
  background: var(--dark-card);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light .content-page section {
  background: var(--light-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.content-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.content-page h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--secondary);
}

.content-page p {
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.content-page ul {
  list-style: none;
  padding-left: 0;
}

.content-page ul li {
  padding: 10px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-muted);
}

.content-page ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--gradient);
  border-radius: 50%;
}

#disqus_thread {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 40px;
}

@media (max-width: 1024px) {
  .navbar {
    padding: 0 30px;
  }
  
  .nav-links {
    gap: 25px;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
    height: 60px;
  }
  
  .nav-links {
    display: none;
  }
  
  header h1 {
    font-size: 2.5rem;
  }
  
  header .subtitle {
    font-size: 1rem;
  }
  
  main {
    padding: 0 20px 60px;
  }
  
  .groups-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
  
  .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .content-page {
    padding: 0 20px;
  }
  
  .content-page section {
    padding: 24px;
  }
}
