/* ========== ROOT VARIABLES ========== */
:root {
  --bg: #000;
  --text: #fff;
  --accent: #ff2d55;
  --header-height: 56px;
  --bottom-nav-height: 56px;
  --side-width: 260px;
}

/* ========== GLOBAL RESET ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
  padding-bottom: var(--bottom-nav-height);
}

/* ========== HEADER ========== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
header .logo { height: 36px; object-fit: contain; }
.menu-icon {
  width: 30px; height: 24px;
  cursor: pointer; display: flex;
  flex-direction: column; justify-content: space-between;
}
.menu-icon span { background: #fff; height: 3px; border-radius: 2px; }

/* ========== SIDE MENU ========== */
.side-menu {
  position: fixed;
  top: 0; right: -260px;
  width: var(--side-width); height: 100vh;
  background: #111; color: #fff;
  transition: right 0.3s ease; z-index: 1500;
  padding: calc(var(--header-height) + 20px) 20px;
  display: flex; flex-direction: column;
}
.side-menu.active { right: 0; }
.side-menu a {
  color: #fff; text-decoration: none; padding: 12px 0; font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.side-menu a:hover { color: var(--accent); }

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: #000; display: flex;
  justify-content: space-around; align-items: center;
  z-index: 1000; border-top: 1px solid rgba(255,255,255,0.1);
}
.bottom-nav button {
  background: transparent; border: none; color: #fff;
  font-size: 10px; cursor: pointer; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
}
.bottom-nav button img { width: 24px; height: 24px; }

/* ========== REELS PAGE ONLY ========== */
.reels-page {
  position: relative;
  background: #000;
  height: 100vh;
  overflow: hidden;
}

.reels-page main {
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.scroll-container {
  height: 100%;
}

.reel {
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
  scroll-snap-align: start;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

/* ========== REEL CONTROLS ========== */
.play-pause-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 70px; height: 70px;
  color: #fff; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.footer-tags {
  position: absolute; bottom: 80px; left: 12px;
  font-size: 14px; background: rgba(0,0,0,0.4);
  padding: 5px 10px; border-radius: 6px;
  max-width: 80%; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.right-icons {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 15;
}

.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s ease;
}
.icon-btn img { width: 36px; height: 36px; }
.icon-btn span { font-size: 12px; margin-top: 4px; }
.icon-btn:hover { transform: scale(1.1); }

.audio-btn {
  width: 50px; height: 50px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.audio-btn img { width: 28px; height: 28px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
  .footer-tags { font-size: 12px; bottom: 60px; }
  .icon-btn img { width: 28px; height: 28px; }
  .audio-btn { width: 40px; height: 40px; }
  .play-pause-btn { width: 60px; height: 60px; font-size: 24px; }
}
