/* Font Imports */
@font-face {
  font-family: 'FFFLauta';
  src: url('https://static.essential.gg/fonts/ffflauta/standard/400/roman.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  src: url('https://static.essential.gg/fonts/geist/standard/variable.woff2') format('woff2');
}

/* Variables */
:root {
  --black: #000000;
  --red: #ff2222;
  --blue: #3e8fff;
  --gray: rgba(255,255,255,0.1);
  --text: rgba(255,255,255,0.7);
  --transition: 0.2s cubic-bezier(0.65, 0, 0.35, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}

body {
  background: var(--black);
  color: white;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: backgroundSlide 60s linear infinite;
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 74px;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--gray);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'FFFLauta', sans-serif;
  font-size: 1.5rem;
  color: white;
  text-decoration: none;
  letter-spacing: 0.5px;
}

/* Main Content Styles */
.main-content {
  min-height: 100vh;
  padding: 74px 2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 1400px;
  width: 100%;
  margin: 4rem auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.hero-content {
  position: relative;
}

.hero-title {
  font-family: 'FFFLauta', sans-serif;
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 500px;
}

/* Events Section Styles */
.section-title {
  font-family: 'FFFLauta', sans-serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.events-container {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 1rem;
  margin-right: -1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) rgba(255,255,255,0.05);
}

.events-container::-webkit-scrollbar {
  width: 6px;
}

.events-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

.events-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}

.events-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* Join Button Styles */
.join-button {
  background: var(--red);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'FFFLauta', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.join-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

/* No Events Message Styles */
.no-events {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  /* margin-top: 1rem;*/
  padding: 1rem;
  background: rgba(255,34,34,0.1);
  border-radius: 8px;
  border: 1px solid rgba(255,34,34,0.2);
}

/* Hover and active styles for buttons */
.event-button:active,
.join-button:active,
.promo-button:active {
  transform: translateY(1px);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.event-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--gray);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition);
}

.event-card:hover {
  transform: translateY(-4px);
}

.event-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.event-content {
  padding: 1.25rem;
}

.event-title {
  font-family: 'FFFLauta', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.event-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.event-description {
  color: var(--text);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-button {
  background: var(--blue);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'FFFLauta', sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.event-button:hover {
  filter: brightness(1.2);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: rgba(0,0,0,0.95);
  border: 1px solid var(--gray);
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) rgba(255,255,255,0.05);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
  filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.5));
  transition: transform var(--transition);
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

.modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.modal-body {
  padding: 2rem;
}

.modal-title {
  font-family: 'FFFLauta', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.modal-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  margin: -0.5rem 0 1.5rem;
  font-size: 1rem;
}

.modal-description {
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.modal-description p {
  margin-bottom: 1.5rem;
}

.modal-description p:last-child {
  margin-bottom: 0;
}

.download-button {
  background: var(--red);
  padding: 0.75rem 1.5rem;
}

/* Server Status Styles */
.server-status {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--gray);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  backdrop-filter: blur(10px);
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.status-header h3 {
  font-family: 'FFFLauta', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.online {
  background: #22c55e;
}

.offline {
  background: var(--red);
}

.loading {
  background: #9ca3af;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.status-label {
  color: var(--text);
}

/* Promo Section Styles */
.bisect-promo {
  position: sticky;
  top: 90px;
  background: rgba(0,32,96,0.2);
  border: 1px solid rgba(62,143,255,0.3);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  height: fit-content;
}

.bisect-title {
  font-family: 'FFFLauta', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--blue);
}

.bisect-description {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.promo-button {
  background: var(--blue);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'FFFLauta', sans-serif;
  text-transform: uppercase;
}

.promo-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.promo-code {
  display: inline-block;
  background: rgba(62,143,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: monospace;
  margin-top: 1rem;
  border: 1px solid rgba(62,143,255,0.2);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .container {
    gap: 3rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .join-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .no-events {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }
  
  .server-status {
    margin: 2rem auto;
    max-width: 500px;
  }

  .bisect-promo {
    position: relative;
    top: 0;
    max-width: 500px;
    margin: 0 auto;
  }

  .no-events {
    justify-content: center;
    max-width: 500px;
    margin: 1rem auto;
  }

  .hero-subtitle {
    margin: 0 auto 2rem;
  }

  .server-status {
    margin: 2rem auto;
    max-width: 500px;
  }

  .bisect-promo {
    position: relative;
    top: 0;
    max-width: 500px;
    margin: 0 auto;
  }

  .no-events {
    justify-content: center;
    max-width: 500px;
    margin: 1rem auto;
  }

  /* Updated event card styles for better mobile layout */
  .event-card {
    max-width: 500px;
    margin: 0 auto;
  }

  .event-content {
    text-align: center;
  }

  .event-button {
    justify-content: center;
  }

  .event-date {
    justify-content: center;
  }
}

/* Animation */
@keyframes backgroundSlide {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}
