/* ====== ENHANCED MODERN CSS FOR MSMUN 2026 ====== */

/* ====== CSS Variables & Custom Properties ====== */
:root {
  /* Primary Colors */
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  
  /* Accent Colors */
  --accent: #facc15;
  --accent-light: #fde047;
  --accent-dark: #eab308;
  
  /* Dark Theme Colors */
  --dark: #0b1120;
  --darker: #050811;
  --bg: #0f172a;
  --bg-light: #1e293b;
  --bg-lighter: #334155;
  --card-bg: #020617;
  --card-bg-light: #1e293b;
  
  /* Text Colors */
  --text: #e5e7eb;
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --text-muted-light: #d1d5db;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  
  /* Shadows */
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.65);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.7);
  --shadow-hover: 0 20px 40px rgba(59, 130, 246, 0.3);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.4);
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ====== Advanced Loading Screen ====== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  color: var(--text);
}

.loading-logo {
  font-size: 4rem;
  margin-bottom: 2rem;
  animation: pulse-glow 2s infinite;
}

.loading-text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loading-progress {
  width: 0;
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  animation: loading-bar 3s ease-in-out;
}

@keyframes loading-bar {
  0% { width: 0; }
  100% { width: 100%; }
}

@keyframes pulse-glow {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* ====== Particle Background ====== */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--gradient-dark);
}

/* ====== Advanced Navigation ====== */
.navbar {
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.95) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  transition: all var(--transition-medium);
  padding: 1rem 0;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.98) !important;
  box-shadow: var(--shadow-soft);
  padding: 0.5rem 0;
}

.brand-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.navbar-nav .nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text) !important;
  background: rgba(59, 130, 246, 0.1);
}

.navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
}

.nav-cta {
  background: var(--gradient-primary) !important;
  border: none !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-glow);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
}

/* ====== Enhanced Hero Section ====== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(168, 85, 245, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.live-indicator i {
  color: #ef4444;
  font-size: 0.5rem;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle-text {
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0.8;
  display: block;
  margin-top: 0.5rem;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-light);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all var(--transition-medium);
}

.btn-xl {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  transition: all var(--transition-medium);
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Hero Image Container */
.hero-image-container {
  position: relative;
  perspective: 1000px;
}

.floating-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-soft);
}

.floating-card:hover {
  transform: rotateY(0) rotateX(0) scale(1.05);
}

.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.floating-card:hover .card-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  transform: translateY(20px);
  transition: transform var(--transition-medium);
}

.floating-card:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.overlay-content p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce-arrow 2s infinite;
}

@keyframes bounce-arrow {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(-10px); }
  60% { transform: rotate(45deg) translateY(-5px); }
}

/* ====== Advanced Features Section ====== */
.features-section {
  padding: 100px 0;
  position: relative;
}

.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}

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

.feature-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  height: 100%;
  transition: all var(--transition-medium);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.feature-card:hover::before {
  opacity: 1;
}

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

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-glow);
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  color: var(--text-muted);
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ====== Advanced Highlights Section ====== */
.highlights-section {
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
}

.highlight-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-slow);
}

.highlight-image img:hover {
  transform: scale(1.05);
}

.highlight-content {
  padding: 2rem;
}

.highlight-features {
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-item i {
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

/* ====== Advanced CTA Section ====== */
.cta-section {
  padding: 100px 0;
  background: var(--gradient-primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
}

.cta-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.cta-note {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* ====== Advanced Footer ====== */
.footer-section {
  background: var(--darker);
  padding: 80px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-brand .brand-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
}

.footer-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-contact {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.footer-contact i {
  width: 20px;
  color: var(--primary-light);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition-medium);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  color: var(--text-muted);
}

.copyright {
  margin: 0;
}

.made-with {
  margin: 0;
  font-size: 0.9rem;
}

.made-with i {
  color: #ef4444;
  animation: pulse-red 1.5s infinite;
}

/* ====== Back to Top Button ====== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
  z-index: 1000;
  box-shadow: var(--shadow-glow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

/* ====== Advanced Animations ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Classes */
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease-out;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease-out;
}

.animate-zoomIn {
  animation: zoomIn 0.6s ease-out;
}

.animate-slideInUp {
  animation: slideInUp 0.8s ease-out;
}

/* ====== Advanced Responsive Design ====== */
@media (max-width: 992px) {
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .floating-card {
    transform: rotateY(0) rotateX(0);
    margin-top: 3rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 0;
  }
  
  .brand-title {
    font-size: 1rem;
  }
  
  .hero-section {
    padding: 80px 0 40px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .features-section {
    padding: 60px 0;
  }
  
  .feature-card {
    padding: 2rem;
  }
  
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-section {
    padding: 60px 0 20px;
  }
  
  .footer-bottom .row {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .back-to-top {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .btn-xl {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
  }
}

/* ====== Advanced Utilities ====== */
.glass-effect {
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

.shadow-hover:hover {
  box-shadow: var(--shadow-hover);
}

.transition-all {
  transition: all var(--transition-medium);
}

.transition-fast {
  transition: all var(--transition-fast);
}

.transition-slow {
  transition: all var(--transition-slow);
}

/* ====== Custom Scrollbar ====== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ====== Selection Styles ====== */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text);
}

::-moz-selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text);
}