/* MP Store – brand colors from logo */
:root {
  --bg: #000000;
  --bg-alt: #0a0a0a;
  --bg-card: #111318;
  --blue: #243b61;
  --blue-light: #2c4a75;
  --blue-glow: rgba(36, 59, 97, 0.45);
  --text: #ffffff;
  --text-muted: #9ca3af;
  --border: rgba(44, 74, 117, 0.35);
  --radius: 12px;
  --radius-lg: 20px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.nav-auth {
  flex-shrink: 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  border-radius: 50%;
  border: 2px solid var(--blue);
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-logo img {
  border-radius: 8px;
}

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--blue-light);
}

.btn-outline {
  background: transparent;
  border-color: var(--blue);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(36, 59, 97, 0.25);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

.btn-discord {
  background: #5865f2;
}

.btn-discord:hover {
  background: #4752c4;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background: url("../assets/hero-banner.png") center / cover no-repeat;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.85) 60%, #000 100%),
    radial-gradient(ellipse 60% 50% at 50% 30%, var(--blue-glow), transparent);
  pointer-events: none;
}

.hero-bg {
  display: none;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 60px 0 80px;
}

.hero-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 40px var(--blue-glow));
}

.hero-tag {
  color: var(--blue-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.stat-value {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--blue-light);
}

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

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

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

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.product-card:hover {
  border-color: var(--blue-light);
  transform: translateY(-4px);
}

.product-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(36, 59, 97, 0.4);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  color: var(--text-muted);
}

.about-card-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  margin-bottom: 12px;
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.status-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.status-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.status-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Discord CTA */
.discord-cta {
  text-align: center;
}

.discord-content h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.discord-content p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

/* Contact */
.contact-box {
  text-align: center;
  max-width: 560px;
}

.contact-box h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: min(440px, 100%);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-logo {
  margin: 0 auto 16px;
  border-radius: 12px;
}

.modal-box h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.ticket-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ticket-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  background: rgba(36, 59, 97, 0.2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  font-family: inherit;
}

.ticket-type-card:hover {
  border-color: var(--blue-light);
  background: rgba(36, 59, 97, 0.35);
  transform: translateY(-2px);
}

.ticket-type-icon {
  font-size: 2rem;
}

.ticket-type-card strong {
  font-size: 1.1rem;
}

.ticket-type-card span:last-child {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Chat panel */
.chat-panel[hidden] {
  display: none;
}

.chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(380px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 100px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  z-index: 150;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--blue);
  border-bottom: 1px solid var(--border);
}

.chat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.chat-header h3 {
  font-size: 1rem;
}

.chat-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}

.chat-close:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty,
.chat-loading,
.chat-error {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
  margin: auto;
}

.chat-error {
  color: #f87171;
}

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-msg-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.chat-msg-body {
  flex: 1;
  min-width: 0;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.chat-msg-meta strong {
  font-size: 0.85rem;
}

.chat-msg-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-source {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(36, 59, 97, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-source.discord {
  background: rgba(88, 101, 242, 0.3);
}

.chat-msg-body p {
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-msg-web .chat-msg-body p {
  background: rgba(36, 59, 97, 0.3);
  padding: 8px 12px;
  border-radius: 0 12px 12px 12px;
}

.chat-msg-discord .chat-msg-body p {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 0 12px 12px 12px;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--blue-light);
}

.chat-input input:disabled {
  opacity: 0.6;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.97);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .user-name {
    display: none;
  }

  .ticket-type-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
