:root {
  --bg: #111218;
  --panel: #191b24;
  --text: #e7e9ee;
  --muted: #a6adbb;
  --accent: #ff4081;
  --accent-2: #6a5acd;
}

* {   
  box-sizing: border-box;
}

body {
  /*background-image: url('/public/default.png');*/
  /*
  background: linear-gradient(135deg, #0a0f1f 0%, #161b2e 50%, #1a0033 100%);
  background-attachment: fixed;
  color: #f0f0f0;*/
background: linear-gradient(-45deg, #1a1a1a, #0d0d0d, #2a2a2a, #141414);
  background-size: 400% 400%;
  animation: grayShift 18s ease infinite;
  color: #f0f0f0;
  /*background-image: url('/public/car.png');*/
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: var(--text);
}

@keyframes grayShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 20px 60px; /* increased top padding for fixed top bar */
  text-align: center;
}

h1 {
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.primary,
.secondary,
.switch-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.2s ease;
  margin: 8px 6px;
}

.primary {
  background: linear-gradient(45deg, var(--accent), #ff6b9e);
  color: white;
  box-shadow: 0 6px 18px rgba(255, 64, 129, 0.25);
}
.primary:hover {
  transform: translateY(-1px);
}

.secondary {
  background: linear-gradient(45deg, var(--accent-2), #8a79ff);
  color: white;
  box-shadow: 0 6px 18px rgba(106, 90, 205, 0.25);
}
.secondary:hover {
  transform: translateY(-1px);
}

/* Top-bar styling */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background:transparent;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Branding inside top bar */
.branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-shadow: 
    -1px -1px 0 black,
     1px -1px 0 black,
    -1px  1px 0 black,
     1px  1px 0 black;
}

/* Switch button inside top bar */
.switch-btn {
  background: linear-gradient(45deg, var(--accent-2), var(--accent));
  color: white;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 64, 129, 0.25);
  transition: transform 0.05s ease, box-shadow 0.2s ease;
}
.switch-btn:hover {
  transform: translateY(-1px);
}

.stage {
  position: relative;
  margin: 22px auto 8px;
  width: min(300px, 90vw);
  height: min(300px, 90vw);
  border-radius: 16px;
  overflow: hidden;
}

video,
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.emotion-display {
  margin: 14px 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
}

.controls {
  margin: 10px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

#visualizer {
  margin-top: 10px;
  width: min(90%, 700px);
  height: min(160px, 40vw);
  background: #0b0b0f;
  border-radius: 14px;
  outline: 1px solid rgba(255, 255, 255, 0.06);
}

#musicPlayer {
  color: white !important;
  text-shadow: none !important;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background-color: transparent;
  border-radius: 0px;
}

#testMood,
#languageSelect,
#musicPlayer {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0px;
}

#testMood option,
#languageSelect option {
  background-color: #000;
  color: white;
}

h1,
.emotion-display,
label,
#testMood,
#languageSelect {
  color: white !important;
  text-shadow: 
    -1px -1px 0 black,  
    1px -1px 0 black,
    -1px 1px 0 black,
    1px 1px 0 black;
}

@media (max-width: 600px) {
  .container {
    padding: 80px 10px 20px; /* adjust for top bar */
  }
  .primary,
  .secondary,
  .switch-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}
