/* ==========================================================================
   KINOX RENTAL - MASTER DESIGN SYSTEM & CINEMATIC THEME
   Obsidian, Crimson Accent, Glassmorphism, Precision Typography
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core Colors */
  --bg-main: #0a0c10;
  --bg-surface: #11141d;
  --bg-surface-elevated: #181d2a;
  --bg-glass: rgba(17, 20, 29, 0.75);
  --bg-glass-card: rgba(24, 29, 42, 0.65);
  --bg-glass-elevated: rgba(30, 36, 52, 0.85);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(229, 9, 20, 0.35);

  /* Cinematic Brand Accents */
  --primary-red: #e50914;
  --primary-red-hover: #ff222f;
  --primary-red-glow: rgba(229, 9, 20, 0.4);
  --primary-gradient: linear-gradient(135deg, #e50914 0%, #b8050e 100%);

  --accent-gold: #f59e0b;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;

  /* Typography Colors - High Contrast & Crisp Legibility */
  --text-main: #ffffff;
  --text-body: #e2e8f0;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --text-glow: #ffffff;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 30px rgba(229, 9, 20, 0.3);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  /* A CSS gradient, not a 1920px Unsplash photo. The photo was being covered
     by an 88%-opaque black overlay anyway, so every visitor downloaded a
     ~300KB image they could not see — on the admin portal too. */
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(229, 9, 20, 0.10) 0%, rgba(10, 12, 16, 0) 60%),
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(30, 41, 59, 0.35) 0%, rgba(10, 12, 16, 0) 70%);
  background-repeat: no-repeat;
  background-attachment: scroll;
  overflow-x: hidden;
}

main, header, footer {
  position: relative;
  z-index: 1;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  line-height: 1.6;
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: transparent;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
}

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

/* Common Layout Containers */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-red-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-red-hover) 0%, #c40a14 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  border-color: var(--primary-red);
  color: var(--primary-red);
  background: rgba(229, 9, 20, 0.08);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  padding: 0.65rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Badge System */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
}

.badge-in-stock {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-booked {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-category {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-featured {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  min-width: 280px;
  max-width: 420px;
  backdrop-filter: blur(12px);
}

.form-select {
  background: #161b26;
  background-color: #161b26 !important;
  color: #ffffff !important;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e50914' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1rem;
}

select, select option, .form-select option {
  background-color: #161b26 !important;
  background: #161b26 !important;
  color: #ffffff !important;
  padding: 0.65rem 1rem;
}

select option:checked, select option:hover, .form-select option:checked {
  background-color: #e50914 !important;
  color: #ffffff !important;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 12px var(--primary-red-glow);
}

.toast-item.toast-success {
  border-left: 4px solid var(--accent-green);
}
.toast-item.toast-error {
  border-left: 4px solid var(--primary-red);
}
.toast-item.toast-alert, .toast-item.toast-order {
  border-left: 4px solid var(--accent-gold);
}

.toast-icon {
  font-weight: 800;
  font-size: 1.1rem;
}

.toast-fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* Modal Backdrop & Container */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: all var(--transition-normal);
  position: relative;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  position: sticky;
  bottom: 0;
  background: var(--bg-surface);
  z-index: 10;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border-color: var(--primary-red);
}

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(229, 9, 20, 0.3); }
  50% { box-shadow: 0 0 30px rgba(229, 9, 20, 0.6); }
}

.animate-slide-up {
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

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