/* 
   Phantom Rust - Premium Design System (Standard CSS)
   Original React styles migrated to Vanilla CSS.
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Inter:wght@100..900&display=swap');

:root {
  --primary: #f8441b;
  --primary-hover: #d63816;
  --bg-deep: #0a0a0c;
  --bg-dark: #121217;
  --bg-card: #1c1c24;
  --text-main: #e2e2e7;
  --text-muted: #a1a1aa;
  --accent: #ffb800;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Inter', sans-serif;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: 80px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--primary);
  }

  50% {
    box-shadow: 0 0 20px var(--primary);
  }

  100% {
    box-shadow: 0 0 5px var(--primary);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out forwards;
}

/* --- VIEW MANAGEMENT --- */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* --- GLASSMORPHISM --- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
}

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

.logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-decoration: none;
  color: white;
}

.logo-text span {
  color: var(--primary);
}

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

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  cursor: pointer;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

/* Steam Login Button */
.btn-steam {
  background: #171a21;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #2a475e;
  transition: all 0.3s ease;
}

.btn-steam:hover {
  background: #2a475e;
  border-color: #66c0f4;
}

.btn-steam img {
  width: 16px;
}

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

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid var(--primary);
}

.username {
  font-weight: 600;
  font-size: 0.9rem;
}

.logout-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
}

.logout-link:hover {
  color: var(--primary);
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0;
  background-image: linear-gradient(to bottom, rgba(10, 10, 12, 0.4), rgba(10, 10, 12, 1)),
    url('https://files.facepunch.com/pinnacle/1/1b1/rust-wallpaper.jpg');
  /* Rust themed high-res bg */
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding: 1.5rem 4rem;
  border-radius: 20px;
  margin-bottom: 3.5rem;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.stat-divider {
  width: 1px;
  height: 50px;
  background: var(--glass-border);
}

.hero-actions {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--primary);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1rem;
}

/* --- STORE SECTION --- */
.store-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--primary);
}

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

.store-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  cursor: pointer;
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.7rem;
}

.card-image-wrapper {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.card-image {
  max-width: 80%;
  max-height: 80%;
  transition: transform 0.3s ease;
}

.store-card:hover .card-image {
  transform: scale(1.1) rotate(5deg);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.card-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
}

/* --- SUPPORT SECTION --- */
.support-section {
  padding: 5rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.support-container {
  padding: 3rem;
  border-radius: 20px;
}

.support-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.glass-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-main);
  outline: none;
  transition: 0.3s;
}

.glass-input:focus {
  border-color: var(--primary);
}

.success-message {
  text-align: center;
  padding: 2rem;
}

.success-message i {
  font-size: 4rem;
  color: #4caf50;
  margin-bottom: 1.5rem;
}

/* --- KIT MODAL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
}

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

.modal-content {
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10;
}

.close-btn:hover {
  color: white;
}

.modal-header {
  padding: 2.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.premium-badge {
  color: #3b82f6;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.modal-title {
  font-size: 2.5rem;
  font-weight: 900;
}

.modal-body {
  padding: 2.5rem;
  overflow-y: auto;
  flex: 1;
}

.section-subtitle {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-align: center;
  justify-content: center;
}

.item-grid-mini {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.item-slot {
  aspect-ratio: 1;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px;
  border: 1px solid var(--glass-border);
}

.item-slot img {
  max-width: 90%;
  max-height: 90%;
  transition: 0.3s;
}

.item-slot:hover img {
  transform: scale(1.15);
}

.item-qty {
  position: absolute;
  bottom: 5px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: white;
  text-shadow: 1px 1px 2px black;
}

.modal-footer {
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.price-value {
  font-size: 2rem;
  font-weight: 900;
  color: #3b82f6;
}

/* --- FOOTER --- */
.footer {
  padding: 4rem 0;
  border-top: 1px solid var(--glass-border);
  margin-top: 6rem;
  background: var(--bg-dark);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 2rem;
  transition: 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
  }

  .stat-divider {
    display: none;
  }

  .item-grid-mini {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-links a {
    margin: 0 1rem;
  }
}

/* --- SUPPORT TABS & TICKET SYSTEM --- */
.support-tabs {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
  justify-content: center;
}

.support-tab {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 10px 20px;
  transition: 0.3s;
  letter-spacing: 1px;
}

.support-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.support-tab:hover {
  color: white;
}

.section-header p,
.section-subtitle {
  text-align: center;
}

.support-tab-content {
  display: none;
}

.support-tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.ticket-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  cursor: pointer;
}

.ticket-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-subject {
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}

.ticket-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.player-chat-container {
  height: 450px;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
}

.p-bubble {
  max-width: 80%;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.p-bubble.player {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 2px;
}

.p-bubble.staff {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(248, 68, 27, 0.15), rgba(248, 68, 27, 0.05));
  border: 1px solid rgba(248, 68, 27, 0.3);
  border-bottom-right-radius: 2px;
}

.p-bubble-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 900;
}

.link-card.checked .link-action-btn {
  display: none;
}

.p-bubble-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
}

.player-chat-input-bar {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--glass-border);
}

.player-chat-input-bar textarea {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: white;
  padding: 1rem;
  resize: none;
  height: 60px;
  outline: none;
}

.player-chat-input-bar textarea:focus {
  border-color: var(--primary);
}

.premium-badge {
  background: var(--primary);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- ACCOUNT LINKING UI --- */
.account-linking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.link-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.link-card:not(.checked):hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.link-card.checked {
    background: rgba(248, 68, 27, 0.05);
    border-color: var(--primary);
}

.link-icon {
    font-size: 2rem;
    color: var(--text-muted);
}

.link-card.checked .link-icon {
    color: var(--primary);
}

.link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-title {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.link-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.link-card.checked .link-status {
    color: var(--primary);
}

.link-action-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 6px 16px;
    border-radius: 4px;
    transition: 0.3s;
}

.link-action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--primary);
}

.link-check {
    display: none;
    color: var(--primary);
    font-size: 1.2rem;
}

.link-card.checked .link-check {
    display: block;
}

.link-card.checked .link-action-btn {
    display: none;
}

.link-disconnect-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    font-size: 0.6rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 700;
}

.link-disconnect-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border-color: #ff4444;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}