/* === Variables === */
:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --accent: #4ecca3;
  --accent-alt: #e94560;
  --text-primary: #eeeeee;
  --text-secondary: #aaaaaa;
  --font-heading: 'Press Start 2P', monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-height: 70px;
}

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7effc8;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.4;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1rem; margin-bottom: 1.5rem; }
h3 { font-size: 0.7rem; }

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(22, 33, 62, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(78, 204, 163, 0.15);
  z-index: 1000;
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
}

.nav-logo:hover {
  color: #7effc8;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav-hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

/* === Main Content === */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 2rem) 1.5rem 2rem;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}

.hero-title {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(78, 204, 163, 0.3);
}

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

.server-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.version-badge {
  background: var(--bg-card);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(78, 204, 163, 0.3);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(78, 204, 163, 0.15);
}

/* Status dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  display: inline-block;
}

.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

.status-dot.offline {
  background: var(--accent-alt);
  box-shadow: 0 0 8px var(--accent-alt);
}

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

/* IP Box */
.ip-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: all 0.3s;
  gap: 0.3rem;
}

.ip-box:hover {
  background: var(--bg-card);
  box-shadow: 0 0 20px rgba(78, 204, 163, 0.2);
  transform: translateY(-2px);
}

.ip-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ip-value {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
}

.ip-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* === About Section === */
.about {
  padding: 2rem 0 3rem;
}

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

.about-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(78, 204, 163, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.about-card:hover {
  border-color: rgba(78, 204, 163, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.about-card h3 {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

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

/* === Players Section === */
.players-section {
  padding: 2rem 0;
}

.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.player-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(78, 204, 163, 0.1);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s;
}

.player-card:hover {
  border-color: rgba(78, 204, 163, 0.3);
  transform: translateY(-2px);
}

.player-head {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  image-rendering: pixelated;
}

.player-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.player-count {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.no-players {
  color: var(--text-secondary);
  font-style: italic;
}

/* === Page Header === */
.page-header {
  text-align: center;
  padding: 2rem 0 3rem;
}

.page-header h1 {
  color: var(--accent);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(78, 204, 163, 0.2);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* === Plugin Grid === */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.plugin-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(78, 204, 163, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.plugin-card:hover {
  border-color: rgba(78, 204, 163, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.plugin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.plugin-name {
  color: var(--text-primary);
  font-size: 0.7rem;
}

.plugin-version {
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(78, 204, 163, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  white-space: nowrap;
}

.plugin-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.plugin-category {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-gameplay {
  background: rgba(78, 204, 163, 0.15);
  color: var(--accent);
}

.category-performance {
  background: rgba(233, 69, 96, 0.15);
  color: var(--accent-alt);
}

.category-social {
  background: rgba(114, 137, 218, 0.15);
  color: #7289da;
}

.category-connectivity {
  background: rgba(250, 177, 60, 0.15);
  color: #fab13c;
}

/* === Rules === */
.rules-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(78, 204, 163, 0.1);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s;
}

.rule-card:hover {
  border-color: rgba(78, 204, 163, 0.3);
  transform: translateX(5px);
}

.rule-number {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent);
  min-width: 2rem;
  text-align: center;
  line-height: 1;
  padding-top: 0.2rem;
}

.rule-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

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

/* === Schedule === */
.schedule-section {
  padding-bottom: 3rem;
}

.schedule-name-input {
  max-width: 400px;
  margin: 0 auto 2rem;
  text-align: center;
}

.schedule-name-input label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.schedule-name-input input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid rgba(78, 204, 163, 0.3);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.schedule-name-input input:focus {
  border-color: var(--accent);
}

.schedule-name-input input.shake {
  animation: shake 0.5s;
  border-color: var(--accent-alt);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.schedule-grid-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  min-width: 700px;
}

.schedule-table th,
.schedule-table td {
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.slot-header {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  color: var(--accent);
  text-align: left !important;
  padding-left: 1rem !important;
  min-width: 120px;
}

.day-header {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 0.75rem 0.5rem !important;
}

.day-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.55rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.day-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.slot-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left !important;
  padding-left: 1rem !important;
  white-space: nowrap;
}

.vote-cell {
  background: var(--bg-secondary);
  border: 1px solid rgba(78, 204, 163, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 50px;
  vertical-align: top;
  min-width: 90px;
}

.vote-cell:hover {
  border-color: rgba(78, 204, 163, 0.4);
  background: rgba(78, 204, 163, 0.05);
}

.vote-cell.has-votes {
  background: rgba(78, 204, 163, 0.08);
  border-color: rgba(78, 204, 163, 0.2);
}

.vote-cell.user-voted {
  background: rgba(78, 204, 163, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(78, 204, 163, 0.15);
}

.vote-names {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  padding: 2px;
}

.vote-name {
  font-size: 0.7rem;
  background: rgba(78, 204, 163, 0.2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* === Login === */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(78, 204, 163, 0.2);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.login-card h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.login-card h2 {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.login-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 2px solid rgba(78, 204, 163, 0.3);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
  margin-bottom: 1rem;
}

.login-card input:focus {
  border-color: var(--accent);
}

.login-card button {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s;
}

.login-card button:hover {
  background: #7effc8;
  transform: translateY(-2px);
}

.login-error {
  color: var(--accent-alt);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* === Footer === */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(78, 204, 163, 0.1);
  padding: 1.5rem;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(22, 33, 62, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
    border-bottom: 1px solid rgba(78, 204, 163, 0.15);
  }

  .nav-toggle:checked ~ .nav-links {
    max-height: 300px;
    padding: 1rem 0;
  }

  .nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem;
  }

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

  h1 { font-size: 1.1rem; }
  h2 { font-size: 0.85rem; }

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

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

  .ip-value {
    font-size: 1rem;
  }
}
