/* ============================================
   SLAIZEN GARAGE - COMMON STYLES
   ============================================
   Shared purple theme and system overrides 
   for index.html, garage.html and subpages.
   ============================================ */

@import url('../coreSystem/interface.css');

:root {
  /* Default Theme for Garage Elements (Gauges, Radio, Odometer) */
  --theme-color: #a855f7;
  --theme-color-rgb: 168, 85, 247;
  
  /* Standard Slaizen Green for System UI (Login, Profile, Modals) */
  --theme-primary: #00e89e;
  --theme-primary-rgb: 0, 232, 158;
  --theme-secondary: #749d91;
  --theme-secondary-rgb: 116, 157, 145;

  --interface-accent: var(--theme-primary);
  --interface-accent-rgb: var(--theme-primary-rgb);
  --interface-login-bg: rgba(var(--theme-primary-rgb), 0.6);
  --interface-login-border: rgba(var(--theme-primary-rgb), 0.4);
  --interface-border: rgba(var(--theme-primary-rgb), 0.3);
  --interface-hover-shadow: 0 8px 25px rgba(var(--theme-primary-rgb), 0.3);
}

/* Force specific fonts for Garage Auth/System UI */
#auth-nav-container .btn,
#username-display,
.modal-content,
#profile-modal * {
  font-family: 'Orbitron', sans-serif !important;
}

/* Auth Navigation - Specific overrides for Garage (to float above neon filters) */
.auth-nav {
  z-index: 100000 !important;
  pointer-events: auto !important;
}

/* System Modals (Login, Profile, Image Modals) - ALWAYS ON TOP */
.modal,
.simple-image-modal,
#profile-modal,
.modal-content {
  z-index: 200000 !important;
}

.modal-content {
  border-color: var(--theme-primary) !important;
  background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.25) 0%, rgba(var(--theme-secondary-rgb), 0.2) 50%, rgba(var(--theme-primary-rgb), 0.25) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  z-index: 200000 !important;
}

/* Modal backdrop/overlay fix */
.modal,
.simple-image-modal,
#profile-modal {
  z-index: 200000 !important;
}

.modal-content .btn-primary,
.image-comment-form-container .btn,
.image-guest-comment-form-container .btn {
  background: rgba(var(--theme-primary-rgb), 0.9) !important;
  border-color: var(--theme-primary) !important;
}

.modal-content h2,
.modal-content .close,
.modal-content .modal-close,
.image-modal-nav-btn,
.image-modal-date,
.image-modal-comments-container h3,
.comment-author,
.comment-guest-badge {
  color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
}

/* Community Image Modals & Components */
.image-modal-content {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 20px rgba(var(--theme-primary-rgb), 0.4) !important;
}

.image-modal-nav-btn {
  background: rgba(var(--theme-primary-rgb), 0.2) !important;
}

.comment {
  border-left-color: var(--theme-primary) !important;
}

.comment-guest-badge {
  background: rgba(var(--theme-primary-rgb), 0.1) !important;
}

/* Ensure password eye-toggle is always visible and consistent */
#toggle-password {
  display: flex !important;
  visibility: visible !important;
  opacity: 0.7 !important;
}

/* ============================================
   GAUGES & INSTRUMENTS (Odometer)
   ============================================ */

.page-views-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100000 !important;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
  border: 3px solid #333;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.9),
    0 8px 16px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(var(--theme-color-rgb), 0.15);
  cursor: default;
  overflow: hidden;
}

.dashboard-instrument-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.speedometer-dial {
  fill: none;
  stroke: #444;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 180 360;
  transform: rotate(150deg);
  transform-origin: center;
}

.speedometer-progress {
  fill: none;
  stroke: var(--theme-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 60 360;
  transform: rotate(150deg);
  transform-origin: center;
  filter: drop-shadow(0 0 5px var(--theme-color));
  animation: backlightPulse 3s ease-in-out infinite;
}

@keyframes backlightPulse {
  0%, 100% { opacity: 0.7; filter: drop-shadow(0 0 5px var(--theme-color)); }
  50% { opacity: 1; filter: drop-shadow(0 0 10px var(--theme-color)); }
}

#needle-element, .speedometer-needle {
  stroke: #ff3333;
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 65px 65px;
  transform: rotate(-110deg);
  z-index: 3;
}

#needle-element.idle, .speedometer-needle.idle {
  animation: needleIdle 0.8s ease-in-out infinite alternate;
}

#needle-element.flick, .speedometer-needle.flick {
  animation: needleFlick 0.4s cubic-bezier(0.36, 0, 0.64, 1);
}

@keyframes needleIdle {
  0% { transform: rotate(-110deg); }
  100% { transform: rotate(-105deg); }
}

@keyframes needleFlick {
  0% { transform: rotate(-110deg); }
  30% { transform: rotate(-80deg); }
  100% { transform: rotate(-110deg); }
}

.warning-lights {
  opacity: 0.1;
  transition: opacity 0.5s ease;
}

.page-views-counter:hover .warning-lights {
  opacity: 1;
}

.warning-light-engine { fill: #ff8c00; }
.warning-light-oil { fill: #ff0000; }
.warning-light-battery { fill: #ff0000; }

.odometer-mask {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  border: 1px solid #222;
  padding: 3px 6px;
  border-radius: 2px;
  z-index: 2;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.views-count {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 3px;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}

.views-label {
  font-size: 7px;
  color: #666;
  margin-top: 1px;
  letter-spacing: 1px;
  font-weight: 400;
}

.instrument-center {
  fill: #111;
  stroke: #444;
  stroke-width: 1;
}


/* ============================================
   MONSTER GARAGE RADIO (Ultra-Compact)
   ============================================ */

.garage-radio {
  position: fixed;
  bottom: 20px;
  left: 20px; /* Radio on the left */
  z-index: 100000;
  width: 320px;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid #333;
  border-radius: 6px;
  padding: 6px;
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.8),
    0 0 15px rgba(var(--theme-color-rgb), 0.2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.garage-radio:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,1);
  transform: translateY(-5px);
}

.radio-head-unit {
  background: #0f0f0f;
  border: 1px solid #000;
  border-radius: 3px;
  padding: 4px;
  box-shadow: inset 0 1px 5px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
}

.volume-knob-container {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.volume-knob {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, #444 0%, #1a1a1a 100%);
  border: 2px solid #111;
  border-radius: 50%;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.8);
  position: relative;
  cursor: ns-resize;
  transition: transform 0.1s ease;
}

.knob-marker {
  width: 3px;
  height: 3px;
  background: #00f2ff;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 4px #00f2ff;
}

.radio-display-frame {
  background: #000;
  border: 1px solid #222;
  border-radius: 2px;
  padding: 4px 8px;
  height: 30px;
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,1);
}

.radio-display-text {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.75rem;
  color: #00f2ff;
  text-shadow: 0 0 5px rgba(0, 242, 255, 0.6);
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
}

.scrolling-text {
  display: inline-flex;
  padding-left: 100%;
  animation: radioScroll 8s linear infinite;
}

@keyframes radioScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.playback-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.play-mini {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, #333 0%, #111 100%);
  border: 1px solid #222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #00f2ff;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.seek-mini {
  color: #444;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.1s ease;
}

.seek-mini:hover { color: #00f2ff; }

.radio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.radio-tuner-bar {
  width: 60%;
  height: 3px;
  background: #000;
  border: 1px solid #222;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.tuner-progress {
  height: 100%;
  background: linear-gradient(90deg, #00f2ff, #0072ff);
  width: 0%;
  box-shadow: 0 0 5px #00f2ff;
}

.radio-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 5px;
  color: rgba(255,255,255,0.1);
  letter-spacing: 1px;
  text-transform: uppercase;
  pointer-events: none;
}

/* Global Utilities */
.hidden {
  display: none !important;
}
