/* Reset and base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --primary-color: #38a34a;
  --gradient-start: #2c2c34;
  --gradient-end: #1a1a1f;
  --text-color: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --discord-blue: #5865F2;
  --main-radius: 24px;
}

/* Background particles */
#particles-js {
  position: fixed; inset: 0;
  z-index: 0;
}

/* Body */
body {
  display: grid;
  place-items: center;
  background-color: var(--primary-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
  min-height: 100vh;
  padding: 16px;
}

/* Card wrapper */
.wrapper {
  position: relative;
  width: min(92vw, 440px);
  transition: transform 0.3s ease;
  z-index: 1;
}
.wrapper:hover { transform: translateY(-3px); }

/* Main container card */
#container {
  background: linear-gradient(145deg, var(--gradient-start), var(--gradient-end));
  border-radius: var(--main-radius);
  padding: clamp(20px, 4.5vw, 32px);
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  min-height: 56vh;
  margin-top: 64px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Loader */
#spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: var(--text-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Logo intro anim */
#logo {
  width: 128px; height: 128px;
  opacity: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, 0);
  z-index: 2;
}
@keyframes logoMoveUp {
  from { opacity: 0; transform: translate(-50%, 0); }
  to   { opacity: 1; transform: translate(-50%, -80px); }
}
.animate-logo { animation: logoMoveUp 1s ease-out forwards; }

/* Content intro */
#content {
  opacity: 0;
  position: relative;
  width: 100%;
  padding-top: 60px;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-content { animation: fadeInUp 1s ease-out forwards; animation-delay: 1s; }

/* Typography */
.title-group {
  margin-bottom: .75rem;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
h1 {
  font-size: clamp(1.35rem, 4.8vw, 1.75rem);
  margin-bottom: 0; font-weight: 700;
}
p { font-size: clamp(.95rem, 3.6vw, 1rem); margin: .7rem 0; }
#content p:nth-of-type(2) { margin-top: 1.25rem; }

code {
  background: rgba(255,255,255,0.1);
  padding: .15em .4em;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: .9em;
}

/* Version pill */
.version {
  display: inline-flex; align-items: center;
  background: rgba(56, 163, 74, 0.1);
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  color: var(--text-secondary);
  transition: background-color .2s ease;
}
.version:hover { background: rgba(56, 163, 74, 0.2); }

/* Status */
.status {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(56, 163, 74, 0.2);
  padding: .5rem 1rem; border-radius: 999px;
  margin: 1rem 0;
}
.status-dot {
  width: 10px; height: 10px; background: #38a34a; border-radius: 50%;
  animation: pulse 2s infinite; box-shadow: 0 0 10px #38a34a;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; box-shadow: 0 0 10px #38a34a; }
  50%{ transform: scale(1.2); opacity: .85; box-shadow: 0 0 20px #38a34a; }
  100%{ transform: scale(1); opacity: 1; box-shadow: 0 0 10px #38a34a; }
}

/* Primary actions row */
#github-buttons {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
  justify-items: center;
}
@media (min-width: 420px) {
  #github-buttons {
    grid-template-columns: auto auto 1fr;
    align-items: center;
  }
}
#github-buttons {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr; 
  gap: .6rem;
}

.github-button {
  border-radius: 10px;
  text-align: center;   
  padding: 0.5rem 1rem; 
  width: 100%;          
}

.discord-invite {
  background: var(--discord-blue); color: #fff;
  padding: .55em .9em; border-radius: 10px; font-weight: 600;
  text-decoration: none; display: block; align-items: center; gap: 6px;
  font-size: .92rem; white-space: nowrap; border: none;
   margin: 0.8rem auto 0;   
  width: fit-content;      
  text-align: center; 
}
.discord-invite:hover { filter: brightness(1.06); }

/* Timestamp */
#timestamp {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--text-secondary);
  padding: .5rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  display: inline-block;
}

/* Reusable button + legal row */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .6rem 1rem;
  border-radius: 12px; border: none; cursor: pointer;
  text-decoration: none; font-weight: 600; line-height: 1;
  color: #fff; background: rgba(255,255,255,0.12);
  transition: filter .2s ease, background .2s ease;
}
.btn:hover { filter: brightness(1.08); }

.btn-row {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
}
.back-btn {
  background: var(--primary-color);
  color: #fff;
  padding: .6rem 1.2rem;
  border-radius: 12px;
  font-weight: 600;
}
.back-btn:hover {
  background: #2d8a3e;
}

@media (min-width: 420px) {
  .btn-row { grid-template-columns: 1fr 1fr; }
}

/* Small tweaks for very narrow screens */
@media (max-width: 360px) {
  #container { padding: 16px; }
  .discord-invite { width: 100%; justify-content: center; }
}
