/**
 * Na Noże - Base CSS Stylesheet
 * Knives Out / Agatha Christie Noir Aesthetic
 */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161c24;
  --bg-card: #1f2733;
  --bg-card-hover: #273242;
  --border-color: #313d4f;
  --border-gold: #d4af37;

  --gold: #d4af37;
  --gold-hover: #f1c40f;
  --gold-glow: rgba(212, 175, 55, 0.25);

  --blood: #b8222b;
  --blood-bright: #e74c3c;
  --blood-glow: rgba(184, 34, 43, 0.35);

  --success: #2ecc71;
  --warning: #f39c12;

  --text-main: #f5f6fa;
  --text-muted: #95a5a6;
  --text-dark: #1e272e;
  --parchment: #fef9e7;

  --font-serif: "Cinzel", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 0 15px var(--gold-glow);
  --shadow-blood: 0 0 20px var(--blood-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  background-image: linear-gradient(rgba(13, 17, 24, 0.70), rgba(10, 14, 20, 0.85)), url('/static/assets/img/ui/bg_mansion.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Atmospheric Looping Video Background */
.video-bg-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--bg-primary);
  background-size: cover;
  background-position: center;
}

.bg-video-element {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  background: transparent;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.bg-video-element.video-active {
  opacity: 1;
}

.video-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 23, 0.35) 0%, rgba(8, 12, 18, 0.58) 100%);
  pointer-events: none;
}

.host-container, .client-app-container {
  position: relative;
  z-index: 2;
}

h1, h2, h3, h4, .brand-title {
  font-family: var(--font-serif);
  letter-spacing: 0.5px;
  color: var(--gold);
}

.hidden {
  display: none !important;
}

/* Common UI Elements */
button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #b8972e);
  color: var(--text-dark);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-hover), #d4af37);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(80%);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold);
}

.btn-danger, .btn-sabotage {
  background: linear-gradient(135deg, var(--blood), #8c171e);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-blood);
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--blood-bright), var(--blood));
  transform: scale(1.02);
}

/* Inputs & Forms */
.styled-input, .styled-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.styled-input:focus, .styled-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
  outline: none;
}

/* Animations */
@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px var(--blood-glow); }
  50% { box-shadow: 0 0 25px var(--blood-bright); }
  100% { box-shadow: 0 0 10px var(--blood-glow); }
}

@keyframes alarmShake {
  0%, 100% { transform: translate(0, 0) scale(1); }
  20%, 60% { transform: translate(-6px, 0) scale(1.02); }
  40%, 80% { transform: translate(6px, 0) scale(1.02); }
}

.alarm-shake {
  animation: alarmShake 0.4s ease-in-out infinite;
}

.btn-glow {
  animation: pulseGlow 1.5s infinite;
}
