:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --background: #0f0f23;
  --surface: #1a1a2e;
  --surface-2: #16213e;
  --text: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.25);
  --gradient-1: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-2: linear-gradient(135deg, var(--accent), var(--primary));
  --gradient-3: linear-gradient(135deg, var(--secondary), var(--primary-dark));
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-width: 320px;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--background);
  overflow: hidden;
}
.bg-animation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
  animation: backgroundPulse 8s ease-in-out infinite alternate;
}
@keyframes backgroundPulse {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* Header */
.header {
  position: relative;
  padding: 4rem 2rem 6rem;
  text-align: center;
  background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.05));
  width: 100%;
}
.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 200%;
  height: 100%;
  background: var(--gradient-1);
  opacity: 0.03;
  transform: translateX(-50%) skewY(-1deg);
  z-index: -1;
}
.header-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gradient-1);
  padding: 4px;
  animation: logoFloat 3s ease-in-out infinite alternate;
}
.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
@keyframes logoFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(2deg); }
}
.header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  animation: slideInUp 1s ease-out;
}
.header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  animation: slideInUp 1s ease-out 0.2s both;
  font-style: italic;
  font-weight: 500;
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 8rem;
  width: 100%;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  opacity: 0;
  transform: translateY(50px);
}
.card.animate {
  animation: cardSlideIn 0.8s ease-out forwards;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(50px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card:nth-child(odd)  { animation-delay: 0.1s; }
.card:nth-child(even) { animation-delay: 0.2s; }
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-2);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.card:hover::before {
  opacity: 0.05;
}
.card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary);
  box-shadow:
    0 20px 40px var(--shadow),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}
.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-image img {
  transform: scale(1.1);
}
.card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(26,26,46,0.8));
}
.card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
}
.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-detail {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border-left: 3px solid var(--primary);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-1);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: auto;
  align-self: flex-start;
  white-space: nowrap;
}
.card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.card-link:hover::before {
  left: 100%;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99,102,241,0.3);
}

/* Stats Section */
.stats {
  margin: 4rem 0;
  padding: 3rem;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  text-align: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.stat-item {
  padding: 1.5rem;
  background: rgba(255,255,255,0.02);
  border-radius: 15px;
  border: 1px solid var(--border);
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background: var(--surface-2);
  padding: 6rem 2rem 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-1);
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto 4rem;
  text-align: center;
}
.footer-brand {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.footer-slogan {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--gradient-1);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(99,102,241,0.3);
}
.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.cta-button:hover::before {
  left: 100%;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99,102,241,0.4);
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.social-link:hover {
  background: rgba(99,102,241,0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.social-icon {
  font-size: 1.2rem;
}
.footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.update-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 20px;
  border: 1px solid var(--border);
}
.footer-bottom {
  background: var(--background);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}
.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--gradient-1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(99,102,241,0.3);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(99,102,241,0.4);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  border: 1px solid var(--border);
  transform: scale(0.8);
  transition: transform 0.3s ease;
  position: relative;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}
.modal-qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  border: 3px solid var(--border);
  border-radius: 15px;
  background: white;
  padding: 10px;
}
.modal-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.account-info {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.account-bank,
.account-name {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.account-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  user-select: all;
}
.account-number:hover {
  background: rgba(99,102,241,0.1);
  color: var(--primary);
}
.copy-notice {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 1rem 2rem;
  color: var(--text);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.toast.show {
  opacity: 1;
  visibility: visible;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--background);
}
::-webkit-scrollbar-thumb {
  background: var(--gradient-1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ¹ÝÀÀÇü */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .header { padding: 2rem 1rem 3rem; }
  .header-logo { width: 60px; height: 60px; margin-bottom: 1.5rem; }
  .header h1 { font-size: 2.5rem; }
  .header p { font-size: 1rem; max-width: 90%; }
  .container { padding: 0 1rem; }
  .grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .card-image { height: 180px; }
  .card-content { padding: 1.5rem; }
  .stats { padding: 2rem 1rem; margin: 3rem 0; }
  .footer { padding: 4rem 1rem 0; }
  .cta-button { padding: 0.75rem 2rem; font-size: 1rem; }
  .social-links { gap: 1rem; }
  .footer-slogan { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  body { font-size: 13px; }
  .container { padding: 0 0.75rem; }
  .header { padding: 1.5rem 0.75rem 2.5rem; }
  .header-logo { width: 50px; height: 50px; }
  .header h1 { font-size: 2rem; }
  .header p { font-size: 0.9rem; }
  .donation-btn { width: 100%; justify-content: center; padding: 0.75rem 1rem; }
  .grid { margin: 10px 0; }
  .stats { padding: 1.5rem 0.75rem; margin: 2rem 0; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
  .card-image { height: 150px; }
  .card-content { padding: 1rem; }
  .card-title { font-size: 1.25rem; }
  .card-description, .card-detail { font-size: 0.9rem; }
  .card-link { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
  .footer-slogan { font-size: 1.2rem; }
  .footer-main { padding: 0 0.5rem; }
  .social-links { flex-direction: column; align-items: center; gap: 0.75rem; padding: 0; }
  .social-link { padding: 0.6rem 1rem; font-size: 0.9rem; }
  .update-date { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
  .back-to-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 360px) {
  .container { padding: 0 0.5rem; }
  .header { padding: 1.5rem 0.5rem 2rem; }
  .stats { padding: 1rem 0.5rem; }
  .card-content { padding: 0.75rem; }
  .footer-main { padding: 0 0.25rem; }
  .back-to-top { width: 35px; height: 35px; font-size: 0.9rem; }
}
