/* ========================================
   Hytale Space - Global Styles
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Фоны (синхронизированы с Tailwind) */
  --surface: #0f1629;
  --surface-50: #1a2540;
  --surface-100: #151d35;

  /* Текст */
  --content: rgba(255, 255, 255, 0.87);
  --content-muted: rgba(255, 255, 255, 0.6);
  --content-subtle: rgba(255, 255, 255, 0.4);

  /* Акценты */
  --accent: #1d3be2;
  --accent-hover: #4a62e8;

  /* Золотой градиент */
  --gold-light: #ffe98d;
  --gold: #f5a623;
  --gold-dark: #e19f27;

  /* Статусы */
  --status-online: #22c55e;
  --status-offline: #ef4444;
  --status-warning: #f59e0b;

  /* Скругления */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
}

/* --- Typography --- */
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Gradient Text (золотой) --- */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* --- Custom Scrollbar --- */
.scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
}

.scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* --- Card Base --- */
.card {
  background: var(--surface-50);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  transition: all 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* --- Card with Background Image --- */
.card-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--surface) 0%,
    rgba(15, 22, 41, 0.8) 30%,
    transparent 50%,
    rgba(15, 22, 41, 0.8) 70%,
    var(--surface) 100%
  );
  z-index: 1;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

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

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--content);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* --- Status Indicators --- */
.status-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
}

.status-online {
  background: var(--status-online);
  box-shadow: 0 0 8px var(--status-online);
}

.status-offline {
  background: var(--status-offline);
}

/* --- Tag/Badge --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--content-muted);
}

/* --- Link hover effect --- */
.link-hover {
  position: relative;
}

.link-hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.link-hover:hover::after {
  width: 100%;
}

/* --- Section spacing --- */
.section {
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 5rem 2rem;
  }
}

/* --- Line clamp utilities --- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Focus states for accessibility --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Transitions --- */
.transition-base {
  transition: all 0.2s ease;
}

/* --- Glass effect for navbar --- */
.glass {
  background: rgba(15, 22, 41, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- Twemoji flags --- */
img.emoji {
  height: 2em;
  width: 2em;
  margin: 0 0.1em;
  vertical-align: -0.1em;
  display: inline-block;
}
