:root {
  --primary: #FF0050;
  --secondary: #00F2EA;
  --bg-dark: #050816;
  --bg-card: #121420;
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --font-ui: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --nav-height: 60px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-ui);
  overflow: hidden; /* App-like feel */
  height: 100vh;
  width: 100vw;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
}

/* APP LAYOUT */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 600px; /* Constrain on desktop to look like mobile app */
  margin: 0 auto;
  background: #000;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 242, 234, 0.1);
}

/* FEED (HOME) */
.video-feed {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  height: 100%;
  scrollbar-width: none; /* Firefox */
}

.video-feed::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.video-card {
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  position: relative;
  background: #222;
  overflow: hidden;
}

.video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: transform 0.5s ease;
}

.video-card:hover .video-bg {
  transform: scale(1.02);
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 20px calc(var(--nav-height) + 20px) 20px;
  pointer-events: none;
}

.video-info {
  pointer-events: auto;
  max-width: 80%;
}

.video-info h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.location-tag {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
}

.location-tag i {
  color: var(--secondary);
}

.description {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #eee;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SIDEBAR ACTIONS */
.video-actions {
  position: absolute;
  right: 16px;
  bottom: calc(var(--nav-height) + 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  pointer-events: auto;
  align-items: center;
}

.action-btn {
  background: none;
  border: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.2s;
}

.action-btn:active {
  transform: scale(0.9);
}

.action-icon-wrapper {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  transition: all 0.3s;
}

.action-btn.liked .action-icon-wrapper {
  background: var(--primary);
  color: white;
}

.action-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.avatar-container {
  position: relative;
  margin-bottom: 10px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
}

.follow-plus {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
}

/* NAVIGATION */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: #000;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  gap: 4px;
  width: 20%;
  height: 100%;
  transition: color 0.3s;
}

.nav-item i {
  font-size: 1.2rem;
}

.nav-item.active {
  color: white;
}

.nav-add-btn {
  width: 45px;
  height: 30px;
  background: linear-gradient(to right, var(--secondary), var(--primary));
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  border-left: 3px solid var(--secondary);
  border-right: 3px solid var(--primary);
}

/* CATEGORY TABS */
.top-tabs {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 100;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.tab-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.tab-btn.active {
  color: white;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: white;
}

/* OTHER PAGES (Hidden by default in SPA-style, but we are doing multi-page for clean structure. 
   However, for smooth transitions, the structure is designed to look similar) */

.page-container {
  padding: 20px;
  padding-bottom: 80px;
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-y: auto;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 20px;
  position: sticky;
  top: 0;
  background: var(--bg-dark);
  z-index: 50;
}

.search-bar {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar input {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  font-size: 0.9rem;
}

.search-bar input:focus {
  outline: none;
  box-shadow: none;
}

.chips-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.chip {
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  white-space: nowrap;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
}

.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grid-item {
  position: relative;
  aspect-ratio: 9/16;
  border-radius: 8px;
  overflow: hidden;
  background: #333;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 0.8rem;
  color: white;
}

/* FORMS */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--secondary);
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* UTILITIES */
.hero-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 20;
  width: 80%;
}

.play-btn {
  font-size: 3rem;
  color: rgba(255,255,255,0.8);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.paused .play-btn {
  opacity: 1;
}

@media (min-width: 768px) {
  .app-container {
    border: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    height: calc(100vh - 40px);
  }
}