:root {
  --primary-yellow: #FFC107;
  --primary-blue: #2196F3;
  --primary-red: #CE1126;
  --primary-white: #FFFFFF;
  --background-dark: #121212;
  --background-darker: #0A0A0A;
  --shadow-dark: rgba(0, 0, 0, 0.5);
  --shadow-light: rgba(255, 255, 255, 0.08);
  --create-button-bg: radial-gradient(circle at center, #FFD700 0%, #FFA500 50%, #FF4500 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--background-dark);
  color: var(--primary-white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  zoom: 1;
}

/* --- Top Navigation Bar --- */
.top-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(18, 18, 18, 0.1);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  padding: 0 8px;
  z-index: 10000;
  height: 38px;
  align-items: center;
  border: none;
  box-shadow: none;
}

.top-nav-bar .nav-container {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.top-nav-bar .nav-container::-webkit-scrollbar {
  display: none;
}

.top-nav-bar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.top-nav-bar .nav-link:hover {
  color: var(--primary-yellow);
  background: rgba(255, 255, 255, 0.1);
}

.top-nav-bar .nav-link.active {
  color: var(--primary-yellow);
  font-weight: 700;
  background: none;
}

.top-nav-bar .nav-icon {
  font-size: 0.65rem;
}

.top-nav-bar .nav-label {
  font-size: 0.7rem;
}

.top-nav-bar .nav-menu,
.top-nav-bar .mobile-menu {
  display: none;
}

/* --- Header Section --- */
.header-section {
  position: fixed;
  top: 38px;
  left: 0;
  width: 100%;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1002;
  pointer-events: none;
}

.header-section .search-bar,
.header-section .video-tabs {
  pointer-events: all;
}

/* --- Search Bar --- */
.header-section .search-bar {
  position: fixed;
  top: 42px;
  left: 10px;
  background: rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  z-index: 10003;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  width: 25%;
  max-width: 200px;
  height: 32px;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.header-section .search-bar:hover {
  box-shadow: 0 3px 8px rgba(255, 193, 7, 0.4);
  transform: scale(1.02);
}

.header-section .search-bar:focus-within {
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.5);
  transform: scale(1.02);
  z-index: 10004;
}

.header-section .search-input {
  background: transparent;
  border: none;
  color: var(--primary-white);
  font-size: 10px;
  width: 100%;
  max-width: 100%;
  outline: none;
  font-weight: 400;
  transition: all 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  height: 100%;
}

.header-section .search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.header-section .search-input:focus {
  border-bottom: 1px solid var(--primary-yellow);
}

.header-section .search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10003;
  margin-top: 6px;
  max-height: 320px;
  overflow-y: auto;
  animation: slideDown 0.3s ease-in-out;
}

.header-section .search-dropdown-item {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--primary-white);
  font-size: 8px;
  font-weight: 200;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-section .search-dropdown-item:hover {
  background: rgba(255, 193, 7, 0.3);
  color: var(--primary-yellow);
}

.header-section .search-dropdown-item.recent {
  border-bottom: 1px solid var(--shadow-light);
}

.header-section .search-dropdown-item.suggested {
  color: rgba(255, 255, 255, 0.8);
}

.header-section .search-dropdown-item .search-item-icon {
  margin-right: 5px;
  font-size: 9px;
  color: var(--primary-yellow);
}

.header-section .search-dropdown-item .search-item-text {
  flex: 1;
}

/* --- Video Tabs --- */
.header-section .video-tabs {
  position: fixed;
  top: 42px;
  left: 230px; /* 200px search bar max-width + 10px left + 20px gap */
  right: 10px;
  width: auto;
  background: transparent !important;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 8px;
  z-index: 10002;
  height: 32px;
}

.header-section .video-tabs .tab-button {
  background: transparent !important;
  border: none;
  color: var(--primary-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.3s ease, transform 0.2s ease;
  box-shadow: none;
  height: 100%;
  display: flex;
  align-items: center;
  text-transform: none;
}

.header-section .video-tabs .tab-button:hover {
  color: var(--primary-yellow);
  background: transparent !important;
  transform: scale(1.05);
  box-shadow: none;
}

.header-section .video-tabs .tab-button.active {
  color: var(--primary-yellow);
  background: transparent !important;
  border-bottom: 2px solid var(--primary-yellow);
  border-radius: 0;
  box-shadow: none;
}

/* --- Gesture Animation --- */
.interaction-prompt {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10004;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.interaction-prompt.clicked {
  opacity: 0;
  pointer-events: none;
}

.gesture-animation {
  width: 80px;
  height: 100px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swipe-arrow {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 3px solid var(--primary-yellow);
  border-bottom: none;
  border-left: none;
  transform: rotate(-45deg);
  position: absolute;
  animation: swipe-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px var(--primary-yellow), 0 0 20px var(--primary-yellow);
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary-yellow);
  border-radius: 50%;
  opacity: 0;
  animation: particle-orbit 2s ease-in-out infinite;
}

.particle-1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.particle-2 {
  top: 30%;
  right: 20%;
  animation-delay: 0.5s;
}

.particle-3 {
  bottom: 10%;
  left: 30%;
  animation-delay: 1s;
}

.swipe-up-text {
  color: var(--primary-white);
  font-size: 18px;
  font-weight: 600;
  margin-top: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- Bottom Navigation Bar --- */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 18, 18, 0.1);
  backdrop-filter: blur(5px);
  display: grid;
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  justify-items: center;
  align-items: center;
  padding: 4px 2px;
  z-index: 1000;
  border-top: 1px solid var(--shadow-light);
  box-shadow: 0 -2px 6px var(--shadow-dark);
  border-radius: 10px 10px 0 0;
  height: 50px;
  transition: transform 0.3s ease;
}

.bottom-nav-bar .nav-icon {
  color: var(--primary-white);
  font-size: 1.0rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  transition: color 0.3s ease, transform 0.2s ease, background 0.3s ease;
  width: 30px;
  height: 30px;
  text-align: center;
  box-sizing: content-box;
}

.bottom-nav-bar .nav-icon:hover {
  color: var(--primary-yellow);
  transform: translateY(-2px) scale(1.1);
  background: rgba(255, 193, 7, 0.2);
}

.bottom-nav-bar .nav-icon.active {
  color: var(--primary-yellow);
  background: rgba(255, 193, 7, 0.2);
  transform: scale(1.1);
}

.bottom-nav-bar .nav-label {
  font-size: 0.5rem;
  margin-top: 2px;
  font-weight: 500;
  text-shadow: 0 1px 2px var(--shadow-dark);
}

.bottom-nav-bar .create-icon {
  grid-column: 4;
  margin: 0 auto;
}

/* --- Create Button --- */
.bottom-nav-bar .create-icon {
  background: var(--create-button-bg);
  color: var(--background-darker) !important;
  border: none;
  border-radius: 50%;
  box-shadow: 
    0 4px 12px rgba(255, 193, 7, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -3px 4px rgba(255, 69, 0, 0.3);
  transform: scale(1.0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: relative;
}

.bottom-nav-bar .create-icon span.nav-label {
  display: none;
}

.bottom-nav-bar .create-icon:hover {
  transform: scale(1.1);
  box-shadow: 
    0 6px 16px rgba(255, 193, 7, 0.6),
    inset 0 3px 5px rgba(255, 255, 255, 0.5),
    inset 0 -4px 5px rgba(255, 69, 0, 0.4);
}

/* --- Other Sections (Error, Profile, etc.) --- */
.error-overlay {
  position: fixed;
  top: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 0, 0, 0.7);
  color: var(--primary-white);
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 20;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  display: none;
}

.error-overlay.show {
  display: block;
}

.error-overlay .retry-button {
  background: var(--primary-yellow);
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--background-dark);
  margin-top: 8px;
}

.profile-settings {
  padding: 12px;
  background: rgba(18, 18, 18, 0.3);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-pic {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--primary-yellow);
}

.profile-info {
  flex: 1;
}

.profile-username {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-yellow);
}

.profile-bio {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.profile-stats {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.profile-stat {
  font-size: 13px;
}

.profile-stat span {
  font-weight: bold;
  color: var(--primary-yellow);
}

.profile-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--primary-white);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.profile-tab.active {
  color: var(--primary-yellow);
  border-bottom: 2px solid var(--primary-yellow);
}

.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-in-out;
}

.report-modal-content {
  background: rgba(18, 18, 18, 0.9);
  padding: 20px;
  border-radius: 10px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease-in-out;
}

/* --- Shared Utility Classes --- */
.padding-16 { padding: 16px; }
.padding-24 { padding: 24px; }
.margin-top-8 { margin-top: 8px; }
.margin-top-16 { margin-top: 16px; }
.margin-bottom-24 { margin-bottom: 24px; }
.text-primary-white { color: var(--primary-white); }
.text-xl { font-size: 1.25rem; }
.text-center { text-align: center; }
.width-full { width: 100%; }
.height-160 { height: 160px; }
.object-cover { object-fit: cover; }
.rounded { border-radius: 8px; }
.width-96 { width: 96px; }
.height-96 { height: 96px; }
.rounded-full { border-radius: 50%; }
.font-bold { font-weight: bold; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-16 { gap: 16px; }
.justify-center { justify-content: center; }
.min-height-screen { min-height: 100vh; }
.background-dark { background-color: var(--background-dark); }
.reset-layout { transform: none !important; zoom: 1 !important; -webkit-transform: none !important; -ms-transform: none !important; }

/* --- Animations --- */
@keyframes swipe-pulse {
  0% { transform: rotate(-45deg) scale(1); opacity: 0.7; }
  50% { transform: rotate(-45deg) scale(1.2); opacity: 1; }
  100% { transform: rotate(-45deg) scale(1); opacity: 0.7; }
}

@keyframes particle-orbit {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  20% {
    opacity: 0.8;
    transform: translate(0, -20px) scale(1);
  }
  80% {
    opacity: 0.8;
    transform: translate(0, -40px) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translate(0, -50px) scale(0.5);
  }
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
  .header-section {
    padding: 0 8px;
  }

  .top-nav-bar {
    padding: 1px 8px;
    height: 28px;
  }

  .top-nav-bar .nav-container {
    gap: 3px;
    padding: 0 3px;
  }

  .top-nav-bar .nav-link {
    font-size: 0.65rem;
    padding: 2px 4px;
    text-align: center;
  }

  .top-nav-bar .nav-link.active {
    background: rgba(255, 193, 7, 0.4);
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
  }

  .top-nav-bar .nav-links {
    display: none;
  }

  .top-nav-bar .nav-menu {
    display: block;
  }

  .top-nav-bar .mobile-menu {
    display: none;
    position: fixed;
    top: 28px;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.3);
    backdrop-filter: blur(8px);
    flex-direction: column;
    padding: 4px;
    box-shadow: 0 6px 16px var(--shadow-dark);
    z-index: 9999;
    animation: slideDown 0.3s ease-in-out;
  }

  .top-nav-bar .mobile-menu.active {
    display: flex;
  }

  .top-nav-bar .mobile-menu a {
    padding: 3px 4px;
    font-size: 0.6rem;
    color: var(--primary-white);
    text-align: center;
    border-bottom: 1px solid var(--shadow-light);
    transition: color 0.3s ease, background 0.3s ease;
  }

  .top-nav-bar .mobile-menu a:hover {
    color: var(--primary-yellow);
    background: rgba(18, 18, 18, 0.5);
    backdrop-filter: blur(4px);
  }

  .header-section .search-bar {
    width: 40%;
    max-width: 140px;
    padding: 2px 6px;
    top: 38px;
    height: 28px;
  }

  .header-section .search-input {
    font-size: 9px;
  }

  .header-section .video-tabs {
    top: 38px;
    left: 160px; /* 140px search bar max-width + 8px left + 12px gap */
    right: 8px;
    padding: 2px 4px;
    gap: 8px;
    height: 28px;
  }

  .header-section .video-tabs .tab-button {
    font-size: 0.7rem;
    font-weight: 400;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: none;
  }

  .gesture-animation {
    width: 60px;
    height: 80px;
  }

  .swipe-arrow {
    width: 24px;
    height: 24px;
    border-width: 2px;
  }

  .particle {
    width: 5px;
    height: 5px;
  }

  .swipe-up-text {
    font-size: 16px;
  }

  .bottom-nav-bar {
    height: 46px;
    padding: 2px 1px;
    grid-template-columns: repeat(7, minmax(28px, 1fr));
  }

  .bottom-nav-bar .nav-icon {
    font-size: 1.0rem;
    max-width: 28px;
  }

  .bottom-nav-bar .nav-label {
    font-size: 0.5rem;
  }

  .bottom-nav-bar .create-icon {
    width: 36px;
    height: 36px;
    font-size: 1.0rem;
  }

  .error-overlay {
    top: 52px;
  }

  .padding-16 { padding: 12px; }
  .padding-24 { padding: 18px; }
  .margin-top-8 { margin-top: 6px; }
  .margin-top-16 { margin-top: 12px; }
  .margin-bottom-24 { margin-bottom: 18px; }
  .width-96 { width: 80px; }
  .height-96 { height: 80px; }
  .text-xl { font-size: 1.1rem; }
}