@font-face {
  font-family: "Chinese Rocks";
  src: url("../fonts/chinese-rocks-rg.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --lime: #72d903;
  --lime-dark: #5bad02;
  --black: #141414;
  --white: #ffffff;
  --gray: #2a2a2a;
  --gray-light: #888888;
  --font-display: "Chinese Rocks", Georgia, serif;
  --font-body: "Poppins", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(114, 217, 3, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(91, 173, 2, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

main {
  position: relative;
  z-index: 1;
}

/* ── Navbar ── */
.nav-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  pointer-events: none;
}

.nav-bar {
  pointer-events: all;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(114, 217, 3, 0.15);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  padding: 10px 28px 10px 16px;
  position: relative;
}

.nav-bar::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--lime-dark), transparent);
  opacity: 0.6;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 54px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(114, 217, 3, 0.4));
  transition: filter 0.3s, transform 0.3s;
}

.nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 20px rgba(114, 217, 3, 0.7));
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  padding: 8px 18px 12px;
  position: relative;
  transition: color 0.2s;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-link-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background-color: var(--white);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.2s;
}

.nav-links a:hover .nav-link-icon,
.nav-links a.active .nav-link-icon {
  background-color: var(--lime);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--lime);
  transition: width 0.3s ease;
  transform: skewX(-12deg);
  transform-origin: left center;
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 22px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.btn-lime {
  background: var(--lime);
  color: var(--black);
}

.btn-lime:hover {
  background: var(--white);
  box-shadow: 0 0 24px rgba(114, 217, 3, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.btn-discord {
  background: #5865f2;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}

.discord-icon {
  flex-shrink: 0;
  object-fit: contain;
}

.discord-login-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.discord-setup-hint {
  font-size: 0.65rem;
  color: #ff6b6b;
  max-width: 180px;
  text-align: right;
  line-height: 1.3;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.05);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  border: 1px solid rgba(114, 217, 3, 0.2);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  object-fit: cover;
}

.user-name {
  font-size: 0.8rem;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-inner {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-text h1 span {
  color: var(--lime);
  display: block;
}

.hero-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  width: min(540px, 92vw);
  height: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 60px rgba(114, 217, 3, 0.25));
  animation: hero-pulse 4s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { filter: drop-shadow(0 0 60px rgba(114, 217, 3, 0.25)); }
  50% { filter: drop-shadow(0 0 80px rgba(114, 217, 3, 0.45)); }
}

.hero-ring {
  position: absolute;
  width: min(580px, 96vw);
  height: calc(min(580px, 96vw) * 2742 / 4874);
  border: 1px solid rgba(114, 217, 3, 0.1);
  border-radius: 50%;
  animation: ring-spin 20s linear infinite;
}

.hero-ring::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--lime);
}

@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Sections ── */
.section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-title span {
  color: var(--lime);
}

.section-sub {
  color: var(--gray-light);
  margin-bottom: 48px;
  font-size: 0.95rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(114, 217, 3, 0.1);
  padding: 32px 24px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: border-color 0.3s, transform 0.3s;
}

.step-card:hover {
  border-color: rgba(114, 217, 3, 0.4);
  transform: translateY(-4px);
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--lime-dark);
  margin-bottom: 12px;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.step-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* ── Calendar ── */
.calendar-page {
  padding: 120px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.calendar-grid {
  display: grid;
  gap: 32px;
}

.day-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(114, 217, 3, 0.08);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  overflow: hidden;
}

.day-header {
  background: rgba(114, 217, 3, 0.08);
  padding: 16px 24px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(114, 217, 3, 0.15);
}

.slots-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  padding: 20px 24px;
}

.slot-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: all 0.2s;
}

.slot-btn:hover:not(:disabled) {
  background: rgba(114, 217, 3, 0.15);
  border-color: var(--lime);
  color: var(--lime);
}

.slot-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.slot-btn.booked-by-me {
  background: rgba(114, 217, 3, 0.25);
  border-color: var(--lime);
  color: var(--lime);
  cursor: default;
}

.slot-btn.blocked {
  opacity: 0.4;
  cursor: not-allowed;
}

.my-booking-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 24px;
  margin-bottom: 28px;
  background: rgba(114, 217, 3, 0.08);
  border: 1px solid rgba(114, 217, 3, 0.25);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.my-booking-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime-dark);
  margin-bottom: 6px;
}

.my-booking-time {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lime);
}

.my-booking-note {
  font-size: 0.8rem;
  color: var(--gray-light);
  margin-top: 6px;
}

.btn-cancel-slot {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 22px;
  border: 1px solid rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: all 0.2s;
}

.btn-cancel-slot:hover:not(:disabled) {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
}

.btn-cancel-slot:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.slot-btn.full {
  text-decoration: line-through;
}

/* ── Forms ── */
.form-page {
  padding: 120px 24px 80px;
  max-width: 560px;
  margin: 0 auto;
}

.form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(114, 217, 3, 0.12);
  padding: 40px;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime-dark);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--lime);
}

.alert {
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.alert-success {
  background: rgba(114, 217, 3, 0.15);
  border: 1px solid var(--lime);
  color: var(--lime);
}

.alert-error {
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.4);
  color: #ff6b6b;
}

.alert-info {
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: #aab0ff;
}

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.status-pending {
  background: rgba(255, 200, 0, 0.15);
  color: #ffc800;
  border: 1px solid rgba(255, 200, 0, 0.3);
}

.status-confirmed {
  background: rgba(114, 217, 3, 0.15);
  color: var(--lime);
  border: 1px solid var(--lime);
}

.status-none {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray-light);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(114, 217, 3, 0.08);
  color: var(--gray-light);
  font-size: 0.8rem;
}

.footer img,
.footer-logo {
  height: 44px;
  width: auto;
  max-width: none;
  object-fit: contain;
  margin: 0 auto 12px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .nav-bar {
    grid-template-columns: 1fr auto;
    clip-path: none;
    border-radius: 12px;
  }

  .nav-links {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

  .hero-ring {
    width: min(340px, 92vw);
    height: calc(min(340px, 92vw) * 2742 / 4874);
  }
}

/* ── Douanier / Admin ── */
.douanier-page {
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.douanier-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.douanier-stat {
  background: rgba(114, 217, 3, 0.06);
  border: 1px solid rgba(114, 217, 3, 0.15);
  padding: 24px 20px;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.douanier-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--lime);
  line-height: 1;
  margin-bottom: 8px;
}

.douanier-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-light);
}

.douanier-section {
  margin-bottom: 48px;
}

.douanier-section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.douanier-section-title span {
  color: var(--lime);
}

.douanier-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(114, 217, 3, 0.12);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.douanier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.douanier-table th,
.douanier-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.douanier-table th {
  background: rgba(114, 217, 3, 0.08);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime-dark);
}

.douanier-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.douanier-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.douanier-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(114, 217, 3, 0.4);
  object-fit: cover;
  flex-shrink: 0;
}

.douanier-user strong {
  display: block;
}

.douanier-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-light);
  margin-top: 2px;
}

.douanier-slot {
  color: var(--lime);
}

@media (max-width: 768px) {
  .douanier-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .douanier-table th:nth-child(5),
  .douanier-table td:nth-child(5) {
    display: none;
  }
}
