/* ============================================================
   YAPAPOUAIYE LAUNCHER - PREMIUM DESIGN SYSTEM
   ============================================================ */

:root {
  --bg-dark: #090d12;
  --bg-card: #121820;
  --bg-card-hover: #18212c;
  --bg-surface: #1a2330;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(16, 185, 129, 0.4);
  
  --mc-green: #10b981;
  --mc-green-hover: #059669;
  --mc-green-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #38bdf8;
  --accent-gold: #f59e0b;
  --accent-purple: #c084fc;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 25px var(--mc-green-glow);

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: 
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, rgba(9, 13, 18, 0.85) 0%, rgba(9, 13, 18, 0.97) 100%),
    url("assets/background.png") no-repeat center top / cover fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--mc-green);
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(9, 13, 18, 0.85);
  border-bottom: 1px solid var(--panel-border);
  transition: border-color var(--transition-fast);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(18, 24, 32, 0.8);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brand-group:hover .logo-circle {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.6);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffffff;
  line-height: 1.15;
}

.brand-sub {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--mc-green);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active {
  color: var(--mc-green);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--mc-green) 0%, #059669 100%);
  color: #000000;
  box-shadow: 0 4px 18px var(--mc-green-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--panel-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-admin {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.btn-admin:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
  border-color: var(--accent-cyan);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
  border-color: var(--accent-red);
}

/* Hero Section */
.hero-section {
  padding: 70px 0 50px;
  text-align: center;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mc-green);
  margin-bottom: 24px;
}

.hero-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mc-green);
  box-shadow: 0 0 8px var(--mc-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5.5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 18px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, var(--mc-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.server-status-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mc-green);
  box-shadow: 0 0 8px var(--mc-green);
}

.server-ip-copy {
  cursor: pointer;
  color: var(--accent-cyan);
  transition: opacity var(--transition-fast);
}

.server-ip-copy:hover {
  text-decoration: underline;
}

/* Features Grid */
.features-section {
  padding: 40px 0 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--mc-green);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--panel-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mc-green);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* News & Changelog Section */
.news-section {
  padding: 40px 0 70px;
  border-top: 1px solid var(--panel-border);
}

.news-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.category-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.chip-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--mc-green);
  color: #ffffff;
}

.news-search-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  gap: 8px;
  width: 240px;
}

.news-search-box input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12.5px;
  outline: none;
  width: 100%;
}

/* News Cards Grid */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.empty-news-box {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.empty-news-icon {
  color: var(--text-faint);
  opacity: 0.7;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-news-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-news-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 480px;
}

.news-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.news-card:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card-img-wrap {
  width: 100%;
  height: 160px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-update {
  background: rgba(16, 185, 129, 0.15);
  color: var(--mc-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-modpack {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-event {
  background: rgba(192, 132, 252, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.badge-maintenance {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.news-version-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

.news-card-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
  color: #ffffff;
}

.news-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  font-size: 11.5px;
  color: var(--text-faint);
}

.read-more-link {
  color: var(--mc-green);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* News Reader Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-border);
}

.modal-body {
  padding: 24px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: #ffffff;
}

/* Article Markdown Content Styling */
.article-content {
  font-size: 14.5px;
  line-height: 1.7;
  color: #e2e8f0;
}

.article-content h1, 
.article-content h2, 
.article-content h3 {
  font-family: var(--font-heading);
  color: #ffffff;
  margin: 18px 0 10px;
}

.article-content h3 {
  font-size: 16px;
  color: var(--mc-green);
}

.article-content p {
  margin-bottom: 14px;
}

.article-content ul, 
.article-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.article-content li {
  margin-bottom: 6px;
}

.article-content code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-cyan);
  font-size: 12.5px;
}

/* Admin Dashboard Specific Styles */
.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-val {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #ffffff;
}

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--panel-border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Admin Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: #ffffff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}

.form-control:focus {
  border-color: var(--mc-green);
  box-shadow: 0 0 10px var(--mc-green-glow);
}

textarea.form-control {
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.2s ease-out;
}

.toast.success { border-color: var(--mc-green); color: #ffffff; }
.toast.error { border-color: var(--accent-red); color: #fca5a5; }
.toast.info { border-color: var(--accent-cyan); color: #e0f2fe; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.4);
  padding: 30px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a:hover {
  color: #ffffff;
}

.hidden {
  display: none !important;
}

/* ============================================================
   SITE ACCESS GATE & LOCK SYSTEM
   ============================================================ */

html.access-locked body {
  overflow: hidden !important;
}

html.access-locked .site-header,
html.access-locked main,
html.access-locked .site-footer {
  filter: blur(14px) brightness(0.4);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-access-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 10, 15, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.site-access-gate.gate-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.site-access-gate.gate-unlocking {
  opacity: 0;
  transform: scale(1.04);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-access-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(160deg, rgba(20, 28, 38, 0.96) 0%, rgba(11, 16, 23, 0.98) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 20px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(16, 185, 129, 0.18);
  position: relative;
  overflow: hidden;
  animation: gatePopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-access-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mc-green), transparent);
}

@keyframes gatePopIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.gate-shake {
  animation: gateShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-8px); }
  30%, 60%, 90% { transform: translateX(8px); }
}

.gate-logo-box {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
}

.gate-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(14, 20, 28, 0.9);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  display: block;
}

.gate-lock-icon-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mc-green);
  color: #060a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b1017;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gate-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--mc-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.gate-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mc-green);
  box-shadow: 0 0 8px var(--mc-green);
  animation: pulseDot 2s infinite;
}

.gate-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.gate-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.gate-input-group {
  position: relative;
  margin-bottom: 16px;
  text-align: left;
}

.gate-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.gate-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-faint);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.gate-input {
  width: 100%;
  background: rgba(8, 12, 17, 0.85);
  border: 1.5px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 13px 44px 13px 42px;
  color: #ffffff;
  font-size: 15px;
  font-family: var(--font-mono);
  letter-spacing: 1.5px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.gate-input:focus {
  outline: none;
  border-color: var(--mc-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  background: rgba(12, 18, 26, 0.95);
}

.gate-input.input-error {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

.gate-toggle-visibility {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.gate-toggle-visibility:hover {
  color: #ffffff;
}

.gate-error-message {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 16px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gate-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.gate-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.gate-submit-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gate-submit-btn.btn-success-state {
  background: #059669 !important;
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.5) !important;
}

.gate-footer-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-faint);
}

.gate-footer-hint a {
  color: var(--mc-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bouton discret de reverrouillage */
.btn-lock-site-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 12px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-lock-site-action:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5 !important;
}

