/*
 Version Timestamp: Sun, July 26, 2026, 03:15 AM (EDT)
 Resilient FS25 Tactical Theme - Clean Dark Charcoal Vignette & Flexible Tablet Layout
 File: games/FS25/style.css
*/

:root {
  --bg-gradient-overlay: linear-gradient(180deg, rgba(15, 15, 15, 0.72) 0%, rgba(0, 0, 0, 0.94) 100%);
  --bg-wallpaper: url("images/Farming%20Simulator%2025%20Poster%20Image%20(background%20wallpaper).jpg");
  --surface-box: #1e1c1c;
  --surface-card: #282525;
  --surface-card-hover: #322e2e;
  --text-primary: #ffffff;
  --text-muted: #a1a1aa;
  --accent-red: #dc2626;
  --accent-gold: #facc15;
  --accent-green: #22c55e;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-sky: #38bdf8;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --font-main: 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Accents for Container Grid Boxes */
  --color-farms: #10b981;
  --color-infra: #0284c7;
  --color-fields: #84cc16;
  --color-tractors: #ef4444;
  --color-implements: #f97316;
  --color-factories: #3b82f6;
  --color-animals: #10b981;
  --color-contracts: #8b5cf6;
  --color-buying: #38bdf8;
  --color-train: #facc15;
  --color-sales: #ec4899;
  --color-collectibles: #eab308;
  --color-economy: #14b8a6;
}

/* Reset Base Rules */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100vw;
  max-width: 100%;
  min-height: 100vh;
  font-family: var(--font-main);
  font-size: 16px;
  background-image: var(--bg-gradient-overlay), var(--bg-wallpaper);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: var(--text-primary);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent-gold);
}

.logo-icon {
  font-size: 1.5rem;
  color: var(--accent-red);
}

.mobile-toggle {
  display: none;
  background: var(--accent-red);
  color: #ffffff;
  border: none;
  font-size: 1.25rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1.2rem;
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
}

.nav-item {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-box);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  min-width: 220px;
  z-index: 1001;
  padding: 8px 0;
}

.nav-item:hover .dropdown-content,
.nav-item.open .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-content a:hover {
  background: var(--accent-red);
  color: #ffffff;
}

.menu-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.dashboard-container {
  width: 100vw;
  max-width: 100%;
  padding: 2rem 2rem 4rem 2rem;
  flex-grow: 1;
}

.server-banner {
  background: rgba(30, 28, 28, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.banner-layout {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.map-preview-box img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 2px solid var(--accent-gold);
  object-fit: cover;
  cursor: pointer;
}

.banner-title {
  flex-grow: 1;
}

.server-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.server-header-line h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.status-online {
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.status-offline {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.banner-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: rgba(30, 28, 28, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.metric-icon {
  font-size: 2.5rem;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  align-items: start;
}

.dashboard-box {
  background: rgba(30, 28, 28, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.box-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.box-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.box-content::-webkit-scrollbar,
#mod-hub-grid::-webkit-scrollbar {
  width: 6px;
}

.box-content::-webkit-scrollbar-thumb,
#mod-hub-grid::-webkit-scrollbar-thumb {
  background: var(--accent-red);
  border-radius: 4px;
}

/* Dedicated Top Borders */
.dashboard-box:nth-child(1) { border-top: 4px solid var(--color-farms); }
.dashboard-box:nth-child(1) .box-header i { color: var(--color-farms); }

.dashboard-box:nth-child(2) { border-top: 4px solid var(--color-tractors); }
.dashboard-box:nth-child(2) .box-header i { color: var(--color-tractors); }

.dashboard-box:nth-child(3) { border-top: 4px solid var(--color-fields); }
.dashboard-box:nth-child(3) .box-header i { color: var(--color-fields); }

.dashboard-box:nth-child(4) { border-top: 4px solid var(--color-implements); }
.dashboard-box:nth-child(4) .box-header i { color: var(--color-implements); }

.dashboard-box:nth-child(5) { border-top: 4px solid var(--color-factories); }
.dashboard-box:nth-child(5) .box-header i { color: var(--color-factories); }

.dashboard-box:nth-child(6) { border-top: 4px solid var(--color-animals); }
.dashboard-box:nth-child(6) .box-header i { color: var(--color-animals); }

.dashboard-box:nth-child(7) { border-top: 4px solid var(--color-contracts); }
.dashboard-box:nth-child(7) .box-header i { color: var(--color-contracts); }

.dashboard-box:nth-child(8) { border-top: 4px solid var(--color-infra); }
.dashboard-box:nth-child(8) .box-header i { color: var(--color-infra); }

.dashboard-box:nth-child(9) { border-top: 4px solid var(--color-buying); }
.dashboard-box:nth-child(9) .box-header i { color: var(--color-buying); }

.dashboard-box:nth-child(10) { border-top: 4px solid var(--color-train); }
.dashboard-box:nth-child(10) .box-header i { color: var(--color-train); }

.dashboard-box:nth-child(11) { border-top: 4px solid var(--color-sales); }
.dashboard-box:nth-child(11) .box-header i { color: var(--color-sales); }

.dashboard-box:nth-child(12) { border-top: 4px solid var(--color-collectibles); }
.dashboard-box:nth-child(12) .box-header i { color: var(--color-collectibles); }

.dashboard-box:nth-child(13) { border-top: 4px solid var(--color-economy); }
.dashboard-box:nth-child(13) .box-header i { color: var(--color-economy); }

.item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.item-card:hover {
  background: var(--surface-card-hover);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-gold);
  overflow: hidden;
  flex-shrink: 0;
}

.item-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.item-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge-stat {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
}

.badge-good { color: #4ade80; border-color: #4ade80; }
.badge-warning { color: #facc15; border-color: #facc15; }
.badge-danger { color: #ef4444; border-color: #ef4444; }

.farm-money {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: #4ade80;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.mod-hub-header {
  margin-bottom: 1.25rem;
}

.mod-categories-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  max-height: 110px;
  overflow-y: auto;
  padding-right: 4px;
}

.category-filter-btn {
  background: rgba(30, 28, 28, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}

.category-filter-btn.active, .category-filter-btn:hover {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
}

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

.mod-card {
  background: rgba(30, 28, 28, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.mod-card-top {
  display: flex;
  gap: 0.75rem;
}

.mod-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  flex-shrink: 0;
}

.mod-card-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 2px;
}

.mod-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.5rem;
}

.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

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

.lightbox-body {
  background: var(--surface-box);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.lightbox-content {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2.2rem;
  color: var(--text-primary);
  cursor: pointer;
}

.lightbox-caption h2 {
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.lightbox-caption p {
  white-space: pre-wrap;
  line-height: 1.5;
  color: #d1d5db;
  font-size: 0.9rem;
}

.system-footer {
  background: rgba(15, 15, 15, 0.96);
  border-top: 1px solid var(--border-subtle);
  padding: 0.8rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

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

@media (max-width: 1024px) {
  .metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .grid-layout {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .dashboard-container {
    padding: 20px 32px;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 15, 0.98);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-menu.menu-active {
    display: flex;
  }

  .metrics-row {
    grid-template-columns: 1fr;
  }

  .grid-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .banner-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-container {
    padding: 16px 12px;
  }
}
