/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --dark-bg-primary: #1a1b1e;
  --dark-bg-secondary: #2a2b30;
  --dark-text-primary: #ffffff;
  --dark-text-secondary: #a1a1aa;
  --dark-border-color: #3f3f46;
}

/* Dark mode support */
/* Removed as dark mode functionality has been eliminated */

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

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

/* Loading state */
body.loading::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Background Animation */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.bg-animation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  animation: backgroundAnimation 30s infinite alternate;
  z-index: -1;
}

@keyframes backgroundAnimation {
  0% {
    opacity: 1;
    filter: hue-rotate(0deg);
  }
  50% {
    opacity: 0.8;
    filter: hue-rotate(180deg);
  }
  100% {
    opacity: 1;
    filter: hue-rotate(360deg);
  }
}

.bg-animation-item {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite linear;
  z-index: 1;
}

.bg-animation-item:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.bg-animation-item:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: -5s;
}

.bg-animation-item:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 70%;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0px) rotate(360deg);
    opacity: 0.7;
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: 60px;
  padding: 40px 0;
}

.header-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.header-content:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.logo-section i {
  font-size: 2.5rem;
  color: white;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.current-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.current-time i {
  color: var(--accent-color);
}

/* Main Content */
main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Hero Countdown Section */
.hero-countdown {
  display: flex;
  justify-content: center;
}

.countdown-card {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  max-width: 600px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.countdown-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.countdown-header h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.event-date {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.countdown-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.time-unit span {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  display: block;
}

.time-unit label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-separator {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 5px;
}

/* Progress Section */
.progress-section {
  margin-top: 30px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Statistics Section */
.stats-section {
  margin: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.stat-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.stat-card p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Events Timeline */
.events-timeline {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.timeline-header h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Timeline Container */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
}

/* Desktop View */
.timeline-item::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -20px; /* Adjusted to connect to the next icon */
    width: 2px;
    background: var(--border-color);
    display: block; /* Ensure the line is visible */
}

@media (max-width: 480px) {
  .timeline-item::before {
    display: none;
  }
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-marker.completed {
  background: var(--success-color);
}

.timeline-marker.upcoming {
  background: var(--warning-color);
}

.timeline-content {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: 15px;
  padding: 20px;
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.timeline-content.completed {
  border-left-color: var(--success-color);
  opacity: 0.7;
}

.timeline-content.upcoming {
  border-left-color: var(--warning-color);
}

.timeline-content h4 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeline-content p {
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.timeline-content .event-date {
  font-weight: 600;
  color: var(--primary-color);
}

.timeline-content .event-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 10px;
}

.timeline-content .status-completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.timeline-content .status-upcoming {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.timeline-content .status-ongoing {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

.timeline-content .status-starting {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.timeline-content .status-soon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
}

/* Small Countdown Styles */
.small-countdown {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: pulse 2s infinite;
}

.small-countdown .countdown-days,
.small-countdown .countdown-hours {
  font-family: "Inter", monospace;
  font-weight: 700;
}

.small-countdown .countdown-separator {
  margin: 0 2px;
  opacity: 0.8;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.timeline-content.next-event .small-countdown {
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  animation: pulse 1.5s infinite;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Quick Actions */
.quick-actions {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: background 0.3s ease;
}

.quick-actions:hover {
  background: rgba(255, 255, 255, 0.1);
}

.quick-actions h3 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Button Animations */
.action-btn:active {
  transform: translateY(0) scale(0.98);
}

.action-btn.loading {
  position: relative;
  color: transparent;
}

.action-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 60px;
  padding: 40px 0;
}

.footer-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content p {
  color: white;
  margin-bottom: 10px;
}

.footer-content p:last-child {
  margin-bottom: 0;
  opacity: 0.8;
}

/* Floating Action Button */
.floating-action {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

#scroll-to-top {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(100px);
}

#scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

#scroll-to-top:active {
  transform: translateY(-1px) scale(0.95);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  .countdown-display {
    gap: 10px;
  }

  .time-unit {
    min-width: 60px;
  }

  .time-unit span {
    font-size: 2rem;
  }

  .time-unit label {
    font-size: 0.8rem;
  }

  .time-separator {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    justify-content: center;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Improved touch targets */
  .action-btn {
    padding: 16px 28px;
    min-height: 50px;
  }

  .filter-btn {
    padding: 12px 20px;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .header-content {
    padding: 20px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .countdown-card {
    padding: 20px;
  }

  .countdown-header h2 {
    font-size: 1.5rem;
  }

  .countdown-display {
    gap: 8px;
  }

  .time-unit {
    min-width: 50px;
  }

  .time-unit span {
    font-size: 1.5rem;
  }

  .time-unit label {
    font-size: 0.7rem;
  }

  .time-separator {
    font-size: 1.2rem;
  }

  .events-timeline {
    padding: 20px;
  }

  .timeline-header h3 {
    font-size: 1.5rem;
  }

  .timeline-item {
    flex-direction: column;
    gap: 15px;
  }

  .timeline-item::before {
    left: 20px;
    top: 60px;
    height: calc(100% - 60px);
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h4 {
    font-size: 1.1rem;
  }

  .quick-actions {
    padding: 20px;
  }

  .quick-actions h3 {
    font-size: 1.5rem;
  }

  .action-btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  .footer-content {
    padding: 20px;
  }

  /* Additional mobile-specific timeline improvements */
  .timeline-marker {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .timeline-content .event-status {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .small-countdown {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .next-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  /* Improved touch interactions */
  .action-btn:active {
    transform: scale(0.95);
  }

  .filter-btn:active {
    transform: scale(0.95);
  }
}

/* Gradient highlight for upcoming event */
.timeline-content.next-event {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(245, 158, 11, 0.1) 50%,
    rgba(240, 147, 251, 0.1) 100%
  );
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
  position: relative;
  overflow: hidden;
}

.timeline-content.next-event .next-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  position: absolute;
  top: 15px;
  right: 15px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: pulse 2s infinite;
}

/* Additional glow effect for next event */
.timeline-item.next-event {
  position: relative;
}

.timeline-item.next-event::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(245, 158, 11, 0.1));
  border-radius: 20px;
  z-index: -1;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
  }
  to {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
  }
}

/* Dark mode toggle */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.dark-mode-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.dark-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Loading animations */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Enhanced focus states for accessibility */
button:focus-visible,
.filter-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Improved hover effects for timeline items */
.timeline-content {
  cursor: pointer;
}

.timeline-content:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Enhanced filter button animations */
.filter-btn {
  position: relative;
  overflow: hidden;
}

.filter-btn::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;
}

.filter-btn:hover::before {
  left: 100%;
}
