/* Custom CSS for Pretix - Cosmoface Style */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;700&display=swap');

/* Main Site Header Styles */
.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
  background: rgba(13, 10, 27, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 1000;
  width: 100%;
  margin-bottom: 30px;
}

.header-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.site-branding-text {
  display: flex;
  flex-direction: column;
}

.custom-logo-link {
  display: inline-block;
  flex-shrink: 0;
}

.custom-logo {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
  /* Desktop: smooth spin */
  animation: logo-spin-slow 25s linear infinite;
  transition: all 0.3s ease;
}

.custom-logo-link:hover .custom-logo {
  border-color: #00b4d8;
  box-shadow: 0 0 15px #00b4d8;
}

@keyframes logo-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Touch / mobile: steps(12) — ~5x меньше нагрузки на GPU */
@media (pointer: coarse) {
  .custom-logo {
    animation-timing-function: steps(12, end);
    animation-duration: 10s;
  }
}

/* Пользователь включил "Уменьшить движение" в настройках ОС */
@media (prefers-reduced-motion: reduce) {
  .custom-logo {
    animation: none;
    transform: none;
  }
}

.site-title {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-title a {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.3) !important;
  text-decoration: none !important;
}

.site-title a:hover {
  color: #00b4d8 !important;
}

.site-description {
  font-size: 11px;
  color: #94a3b8;
  margin: 3px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: "JetBrains Mono", monospace;
}

/* Navigation Menu */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}

.main-navigation a {
  color: #e2e8f0 !important;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.main-navigation a:hover {
  color: #00b4d8 !important;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

/* Base Body Styles */
body {
  background-color: #0b0813 !important;
  color: #cbd5e1 !important;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, #171233 0%, #0b0813 80%) !important;
  z-index: -10;
  pointer-events: none;
}

/* Main Box & Containers styling */
.container, .container-fluid {
  max-width: 1160px;
}

.main-box, .panel, .card, .well, .jumbotron, .invoice-box {
  background: rgba(20, 16, 41, 0.6) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #cbd5e1 !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.1) !important;
  padding: 24px !important;
  margin-bottom: 24px !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6, .page-header h1, .panel-title {
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.3) !important;
}

/* Links */
a {
  color: #00b4d8 !important;
}

a:hover {
  color: #6366f1 !important;
  text-shadow: 0 0 8px rgba(99, 102, 241, 0.5) !important;
  text-decoration: none !important;
}

/* Form controls */
.form-control, input, select, textarea {
  background-color: rgba(13, 10, 27, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
}

.form-control:focus, input:focus, select:focus, textarea:focus {
  border-color: #00b4d8 !important;
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.4) !important;
  background-color: rgba(13, 10, 27, 0.95) !important;
}

/* Buttons */
.btn-primary, .btn-buy, button[type="submit"], .btn-checkout {
  background: linear-gradient(135deg, #6366f1, #00b4d8) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3) !important;
  transition: all 0.3s ease !important;
  padding: 10px 20px !important;
}

.btn-primary:hover, .btn-buy:hover, button[type="submit"]:hover, .btn-checkout:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.6), 0 0 10px rgba(99, 102, 241, 0.4) !important;
  color: #ffffff !important;
}

.btn-default {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.btn-default:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-color: #00b4d8 !important;
}

/* Tables and product rows */
.table, th, td, .product-row {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
}

thead th {
  color: #ffffff !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

/* Alert boxes */
.alert-info {
  background: rgba(0, 180, 216, 0.15) !important;
  border: 1px solid rgba(0, 180, 216, 0.3) !important;
  color: #e0f2fe !important;
}

.alert-danger, .alert-error {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: #fee2e2 !important;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #d1fae5 !important;
}

/* Cart badge */
.badge {
  background-color: #6366f1 !important;
  color: #ffffff !important;
}

/* Footer customization */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-top: 50px !important;
  padding-top: 20px !important;
  color: #64748b !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-header {
    margin-bottom: 15px;
  }
  .header-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .main-navigation ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Hide default Pretix header and navigation */
body > header:not(.site-header), body > nav {
  display: none !important;
}
