/* =============================================
   GULDOKON.UZ — YouTube + Instagram + Marketplace
   ============================================= */

:root {
  --primary: #000000;
  --primary-dark: #222222;
  --primary-light: #f5f5f5;
  --primary-rgb: 0, 0, 0;
  --bg: #FAFAFA;
  --bg-secondary: #ffffff;
  --card-bg: #ffffff;
  --text: #0f0f0f;
  --text-secondary: #606060;
  --text-light: #909090;
  --border: #e5e5e5;
  --red: #FF0000;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 6px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
}

@font-face {
  font-family: 'TAPfont';
  src: url('fonts/true.ttf') format('truetype');
  font-display: swap;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'TAPfont', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #FAFAFA;
  position: relative;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 64px;
}

a { color: inherit; text-decoration: none; }

/* ====== NAVBAR (YouTube-style) ====== */
.navbar {
  background: #fff;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

.logo-link { display: flex; align-items: center; text-decoration: none; }

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}

.nav-search-form {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 0 1 520px;
  flex: 0 1 520px;
  margin: 0 24px;
}

.nav-search-input {
  flex: 1;
  height: 42px;
  padding: 0 18px;
  border: 1.5px solid #ccc;
  border: 1.5px solid var(--border, #ccc);
  border-right: none;
  border-radius: 22px 0 0 22px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search-input::placeholder {
  color: #999;
}

.nav-search-input:focus {
  border-color: #000000;
  border-color: var(--primary, #000000);
  box-shadow: 0 1px 8px rgba(0,0,0,0.18);
}

.nav-search-btn {
  height: 42px;
  width: 52px;
  border: 1.5px solid #000000;
  border: 1.5px solid var(--primary, #000000);
  border-left: none;
  border-radius: 0 22px 22px 0;
  background: #000000;
  background: var(--primary, #000000);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  transition: background 0.2s;
}

.nav-search-btn:hover {
  background: #222222;
  background: var(--primary-dark, #222222);
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  transition: background var(--transition);
}

.nav-links a:hover { background: #f2f2f2; }

.nav-upload-btn {
  background: var(--primary-light) !important;
  color: var(--primary-dark) !important;
  font-weight: 600 !important;
}

.nav-upload-btn:hover {
  background: #e0e0e0 !important;
}

.nav-register-btn {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-register-btn:hover {
  background: var(--primary-dark) !important;
}

/* ====== MOBILE SEARCH (navbar ichida, logo va hamburger orasida) ====== */
.mobile-search-form {
  display: none;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  margin: 0 10px;
  min-width: 0;
}

.mobile-search-input {
  -webkit-flex: 1;
  flex: 1;
  height: 36px;
  padding: 0 14px;
  border: 1.5px solid #ccc;
  border: 1.5px solid var(--border, #ccc);
  border-right: none;
  border-radius: 20px 0 0 20px;
  font-size: 14px;
  background: #fff;
  color: #1a1a1a;
  color: var(--text, #1a1a1a);
  outline: none;
  min-width: 0;
  width: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mobile-search-input::placeholder {
  color: #999;
}

.mobile-search-input:focus {
  border-color: #000000;
  border-color: var(--primary, #000000);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}

.mobile-search-btn {
  height: 36px;
  width: 42px;
  border: 1.5px solid #ccc;
  border: 1.5px solid var(--border, #ccc);
  border-left: none;
  border-radius: 0 20px 20px 0;
  background: #000000;
  background: var(--primary, #000000);
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  padding: 0;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ====== HAMBURGER ====== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger .bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: #0f0f0f;
  background: var(--text, #0f0f0f);
  border-radius: 2px;
  transition: 0.3s ease;
}

.hamburger.activex .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.activex .bar:nth-child(2) { opacity: 0; }
.hamburger.activex .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====== MOBILE NAV (Slide from left) ====== */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  max-width: 80%;
  height: 100%;
  height: 100vh;
  background: #fff;
  z-index: 999;
  -webkit-transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.mobile-nav.activex { left: 0; }

.mobile-nav-links {
  padding: 60px 12px 20px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.mobile-nav-links a {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 11px 14px;
  margin-bottom: 2px;
  border-radius: 10px;
  border-radius: var(--radius-sm, 10px);
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  color: var(--text, #1a1a1a);
  text-decoration: none;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}

.mobile-nav-links a:active {
  background: #f0f0f0;
}

.mobile-nav-links a i {
  font-size: 19px;
  width: 22px;
  text-align: center;
  margin-right: 12px;
  color: #555;
}

.mobile-nav-links a:hover {
  background: #f5f5f5;
}

.mobile-nav-links .nav-search-form {
  margin: 0 0 8px;
  -webkit-flex: none;
  flex: none;
}

.mobile-nav-links .nav-search-input {
  height: 38px;
  font-size: 14px;
  border-radius: 10px 0 0 10px;
}

.mobile-nav-links .nav-search-btn {
  height: 38px;
  width: 42px;
  border-radius: 0 10px 10px 0;
}

/* ====== MOBILE BOTTOM NAV (Instagram-style) ====== */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid var(--border, #e0e0e0);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
}

.bottom-nav a {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  font-size: 10px;
  color: #606060;
  color: var(--text-secondary, #606060);
  padding: 6px 12px;
  text-decoration: none;
}

.bottom-nav a i { font-size: 22px; }

.bottom-nav a.active,
.bottom-nav a:hover {
  color: #0f0f0f;
  color: var(--text, #0f0f0f);
}

.bottom-nav .upload-btn-nav {
  width: 36px;
  height: 36px;
  background: #000000;
  background: var(--primary, #000000);
  border-radius: 8px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 0;
}

.bottom-nav .upload-btn-nav i {
  color: #fff;
  font-size: 22px;
}

/* ====== CONTAINER ====== */
.container-x {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ====== SECTION HEADERS ====== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 16px 10px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.section-header h2 i { color: var(--primary); }

.section-header a,
.see-all-btn {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: 20px;
  transition: var(--transition);
  text-decoration: none;
}

.section-header a:hover,
.see-all-btn:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ====== REELS HORIZONTAL SCROLL (Instagram Stories style) ====== */
.reels-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 16px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.reels-scroll::-webkit-scrollbar { display: none; }

.reel-card {
  flex: 0 0 160px;
  width: 160px;
  height: 284px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #000;
  display: block;
  scroll-snap-align: start;
}

@media (hover: hover) {
  .reel-card {
    transition: transform var(--transition);
  }
  .reel-card:hover {
    transform: scale(1.03);
  }
}

/* Featured large reel cards (first 3) */
.reel-card-large {
  flex: 0 0 200px;
  width: 200px;
  height: 356px;
}

/* Gradient border via box-shadow (overflow:hidden uchun mos) */

.reel-card img,
.reel-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) {
  .reel-card img,
  .reel-card video {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .reel-card:hover img,
  .reel-card:hover video {
    transform: scale(1.08);
  }
}

.reel-card .reel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
  pointer-events: none;
}

.reel-card .reel-overlay .reel-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-card-large .reel-overlay .reel-title {
  font-size: 14px;
}

.reel-card .reel-overlay .reel-views {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 3px;
}

.reel-card .reel-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.reel-card-large .reel-play-icon {
  width: 44px;
  height: 44px;
}

.reel-card:hover .reel-play-icon { opacity: 1; }

.reel-play-icon i {
  color: #fff;
  font-size: 16px;
  margin-left: 2px;
}

/* ====== PRODUCT GRID (Marketplace style) ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 8px 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: block;
  border: 1px solid rgba(0,0,0,0.04);
}

@media (hover: hover) {
  .product-card {
    transition: transform var(--transition), box-shadow var(--transition);
  }
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  }
}

.product-card-wrapper {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}

.product-card .product-image {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) {
  .product-card .product-image img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .product-card:hover .product-image img {
    transform: scale(1.06);
  }
}

.product-card .product-info {
  padding: 12px 14px;
}

.product-card .product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card .product-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
}

.product-card .product-seller {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ====== VIDEO GRID (YouTube-style) ====== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 8px 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.video-card {
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.video-card a {
  text-decoration: none;
  color: inherit;
}

.video-card:hover .video-thumbnail img,
.video-card:hover .video-thumbnail video {
  transform: scale(1.02);
}

.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e5e5e5;
}

.video-thumbnail img,
.video-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.video-info {
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.video-info h1 {
  font-size: 16px;
  color: var(--text);
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  align-items: center;
}

.video-meta .channel-name {
  color: var(--text-secondary);
}

.video-meta .channel-name:hover {
  color: var(--text);
}

.video-meta .views {
  color: var(--text-secondary);
}

.upload-date {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ====== SUBSCRIBE BUTTON ====== */
.subscribe-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-size: 14px;
  font-family: inherit;
}

.subscribe-btn:hover {
  opacity: 0.85;
}

.subscribe-btn.subscribed {
  background: #f2f2f2;
  color: var(--text);
}

.subscribe-btn.subscribed:hover {
  background: #e5e5e5;
}

/* ====== CHANNEL HEADER ====== */
.channel-header {
  background: #fff;
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.channel-header::before { display: none; }

.channel-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.channel-info {
  padding: 16px 0;
  border-bottom: none;
}

.channel-info-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
}

.channel-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.channel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.channel-title a { color: var(--text); }
.channel-title a:hover { color: var(--text); }

.channel-stats {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.subscribers-count {
  background: none;
  padding: 0;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
}

.channel-actions { margin-top: 0; }

/* ====== BUTTONS ====== */
button[type="submit"] {
  padding: 10px 20px;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.button-submit-login,
.cabinet-button-css {
  background: var(--primary);
}

.button-submit-login:hover,
.cabinet-button-css:hover {
  background: var(--primary-dark);
}

button[type="submit"]:hover {
  opacity: 0.9;
}

button.delete {
  background: #e53935;
}

button.delete:hover {
  background: #c62828;
}

/* ====== FORMS & INPUTS ====== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* ====== CABINET ====== */
.cabinet-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1280px;
  margin: 16px auto;
  padding: 0 16px;
}

.settings-section {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.setting-form {
  margin-bottom: 16px;
  padding: 16px;
  background: #fafafa;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.setting-form:hover {
  border-color: var(--primary);
}

.setting-form h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text);
}

/* Cabinet tabs */
.cabinet-menu {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #fff;
  padding: 4px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  scrollbar-width: none;
}

.cabinet-menu::-webkit-scrollbar { display: none; }

.cabinet-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.cabinet-tab.active,
.cabinet-tab.activex {
  background: var(--text);
  color: #fff;
}

.cabinet-tab:hover:not(.active):not(.activex) {
  background: #f2f2f2;
}

.cabinet-content {
  display: none;
  animation: fadeIn 0.25s ease;
}

.cabinet-content.active { display: block; }

/* Channel card */
.channel-card {
  background: var(--card-bg);
  padding: 20px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.channel-card:hover { box-shadow: var(--shadow-hover); }

.channel-card label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.channel-card input[type="text"],
.channel-card textarea {
  width: 100%;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
}

/* ====== FILE UPLOAD ====== */
.file-upload-wrapper { position: relative; margin-top: 8px; }

.file-upload-input {
  opacity: 0;
  position: absolute;
  width: 1px;
  height: 1px;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  background: #fafafa;
  cursor: pointer;
  transition: var(--transition);
  min-height: 140px;
  text-align: center;
}

.file-upload-label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-icon {
  font-size: 2.5em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.file-upload-label:hover .upload-icon { color: var(--primary); }

.upload-text h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.upload-text h4 span {
  color: var(--primary);
  font-weight: 600;
}

.upload-text p {
  margin: 6px 0 0;
  color: var(--text-light);
  font-size: 12px;
}

.file-upload-label.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-details {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ====== UPLOAD TABS ====== */
.upload-container {
  max-width: 640px;
  margin: 20px auto;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.upload-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.upload-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.upload-tab:hover,
.upload-tab.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ====== PROGRESS BAR ====== */
.progress-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
  display: none;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
  border-radius: 4px;
  text-align: center;
  color: #fff;
  line-height: 8px;
  font-size: 0;
}

.upload-status {
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: var(--radius-sm);
  display: none;
  font-size: 14px;
}

.upload-status.success { background: var(--primary-light); color: var(--primary-dark); }
.upload-status.error { background: #ffebee; color: #c62828; }

/* Slider removed — Stories used instead */

/* ====== FOOTER (Minimal) ====== */
/* Footer olib tashlandi — pastki nav yetarli */

/* ====== CHANNEL FORM ====== */
.channel-form {
  max-width: 480px;
  margin: 24px auto;
  padding: 32px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.channel-form h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.channel-form input[type="text"],
.channel-form textarea {
  width: 100%;
  padding: 10px 14px;
  margin: 6px 0 12px;
}

.channel-error {
  color: #e53935;
  margin: 8px 0;
  font-size: 14px;
}

/* ====== TAPSWAP PLATFORM TEXT ====== */
.tapswap-platform {
  margin: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}

/* ====== REELS FEED (TikTok-style vertical scroll) ====== */
.reels-feed {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: calc(100% - 56px);
  background: #000;
  z-index: 998;
  overflow: hidden;
}

.reels-feed .rf-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}

.reels-feed .rf-back {
  color: #fff;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

.reels-feed .rf-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.reels-feed .rf-search-btn {
  color: #fff;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

/* Scroll container */
.rf-slides {
  width: 100%; height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rf-slides::-webkit-scrollbar { display: none; }

/* Har bir reel slide */
.rf-slide {
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  flex-shrink: 0;
}

.rf-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Right side actions */
.rf-actions {
  position: absolute;
  right: 12px;
  bottom: 140px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  z-index: 5;
}

.rf-action-btn {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.rf-action-btn.liked { color: var(--red); }

.rf-action-count {
  color: #fff;
  font-size: 11px;
  margin-top: -12px;
  text-align: center;
}

/* Bottom info */
.rf-info {
  position: absolute;
  bottom: 60px;
  left: 14px;
  right: 70px;
  z-index: 5;
  color: #fff;
}

.rf-info-author {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.rf-info-title {
  font-size: 13px;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product bar */
.rf-product-bar {
  position: absolute;
  bottom: 110px;
  left: 14px;
  right: 70px;
  z-index: 5;
}

.rf-product-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: #fff;
}

.rf-product-card img {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.rf-product-name {
  flex: 1; min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rf-product-price {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Bottom gradient */
.rf-slide::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  pointer-events: none;
  z-index: 2;
}

/* Search overlay */
.rf-search-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 20;
  display: none;
  flex-direction: column;
  padding: 16px;
}
.rf-search-overlay.active { display: flex; }

.rf-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.rf-search-bar input {
  flex: 1;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  outline: none;
}
.rf-search-bar input::placeholder { color: rgba(255,255,255,0.4); }

.rf-search-bar button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0 8px;
}

.rf-search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rf-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}

.rf-search-item img {
  width: 56px; height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}

.rf-search-item-info { flex: 1; min-width: 0; }

.rf-search-item-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rf-search-item-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* Reels page: navbar yashirish */
.reels-page .navbar { display: none; }
.reels-page .bottom-nav { z-index: 9999; }

/* ====== PRODUCT DETAIL PAGE ====== */
.product-detail {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.product-detail .product-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.product-detail .product-gallery img,
.product-detail .product-gallery video {
  width: 100%;
  height: auto;
  display: block;
}

.product-detail .product-details {
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-detail .product-details h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
}

.product-detail .product-details .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.product-detail .product-details .description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ====== SEARCH TABS ====== */
.search-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  max-width: 1280px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.search-tabs::-webkit-scrollbar { display: none; }

.search-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.search-tab:hover { background: #f2f2f2; }

.search-tab.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ====== WATCH PAGE ====== */
.video-page-container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
  gap: 24px;
}

.video-main-content {
  flex: 1;
  min-width: 0;
}

.video-player-container {
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.video-info-container {
  padding: 12px 0;
  background: transparent;
  border-radius: 0;
}

.video-info-container h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.video-stats {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

.like-dislike {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.like-btn, .dislike-btn {
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  border-radius: 20px;
  background: #f2f2f2;
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.like-btn:hover, .dislike-btn:hover { background: #e5e5e5; }

.like-btn.active { background: var(--primary-light); color: var(--primary-dark); }
.dislike-btn.active { background: #ffebee; color: #c62828; }

.like-btn:disabled, .dislike-btn:disabled { cursor: default; opacity: 0.5; }

.download-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: #f2f2f2;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.download-btn:hover { background: #e5e5e5; }

.video-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: #f2f2f2;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-top: 12px;
  white-space: pre-line;
}

.video-sidebar {
  width: 360px;
  flex-shrink: 0;
}

.video-sidebar h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.video-grid-watch {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-grid-watch .video-card {
  display: flex;
  gap: 8px;
}

.video-grid-watch .video-thumbnail {
  width: 168px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  aspect-ratio: 16/9;
}

.video-grid-watch .video-info {
  flex: 1;
  padding: 0;
}

.video-grid-watch .video-info h3 {
  font-size: 13px;
  -webkit-line-clamp: 2;
}

.video-grid-watch .video-meta {
  font-size: 11px;
}

/* ====== COMMENTS ====== */
.comments-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.comments-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.comments-section textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
  font-family: inherit;
  resize: vertical;
}

.comment {
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
}

.comment-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: none;
}

.comment p {
  font-size: 14px;
  color: var(--text);
  margin: 4px 0;
  line-height: 1.5;
}

.comment small {
  font-size: 12px;
  color: var(--text-light);
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== ALERT MESSAGES ====== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 14px;
}

.alert.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.alert.success {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #ccc;
}

/* ====== ADMIN STYLES (cabinet) ====== */
.admin-pending-videos {
  max-width: 1280px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-title {
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-title .badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}

.admin-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #fafafa;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state h3 { color: var(--text); margin-bottom: 4px; font-size: 16px; }
.empty-state p { color: var(--text-secondary); font-size: 14px; }

.video-thumbnail-waiting {
  height: 100px;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: var(--radius-sm);
}

.video-thumbnail-waiting img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ddd;
}

.thumbnail-placeholder svg { width: 48px; height: 48px; fill: currentColor; }

.video-content { padding: 12px; }

.video-title {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 4px;
  font-weight: 600;
  line-height: 1.4;
}

.video-description-admin {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-preview { margin: 8px 0; border-radius: var(--radius-sm); overflow: hidden; }
.video-preview video { width: 100%; max-height: 180px; background: #000; display: block; }

.video-actions { display: flex; gap: 8px; margin-top: 8px; }
.approve-form, .reject-form { flex: 1; }

.btn-approve, .btn-reject {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
  font-family: inherit;
}

.btn-approve { background: var(--primary); color: #fff; }
.btn-approve:hover { background: var(--primary-dark); }
.btn-reject { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.btn-reject:hover { background: #ffcdd2; }

/* ====== IMAGE UPLOAD ====== */
.image-upload-container { display: flex; gap: 16px; align-items: flex-start; }
.image-display { flex: 0 0 auto; text-align: center; }
.image-display img { max-width: 120px; height: auto; border-radius: var(--radius-sm); }
.placeholder-text {
  color: var(--text-light);
  font-size: 13px;
  padding: 16px;
  background: #fafafa;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
}
.file-upload-container { flex: 1; min-width: 200px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .product-detail { grid-template-columns: 1fr; }
  .video-page-container { flex-direction: column; }
  .video-sidebar { width: 100%; }
  .video-grid-watch .video-card { display: flex; }
}

@media (max-width: 768px) {
  .hamburger { display: block; -webkit-flex-shrink: 0; flex-shrink: 0; }
  .nav-links { display: none; }
  .mobile-search-form { display: -webkit-flex; display: flex; }
  .navbar { padding: 0 10px; height: 48px; gap: 0; }
  .logo-link { -webkit-flex-shrink: 0; flex-shrink: 0; }
  /* bottom-nav already visible by default */

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 8px 12px;
  }

  .video-thumbnail { border-radius: var(--radius-sm); }
  .video-info { padding: 6px 2px; }
  .video-info h3 { font-size: 12px; }
  .video-meta { font-size: 11px; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 12px;
  }

  .product-card .product-info { padding: 8px 10px; }
  .product-card .product-name { font-size: 12px; }
  .product-card .product-price { font-size: 14px; }

  /* reels-grid removed — TikTok feed used */

  .channel-info-inner { gap: 10px; }
  .channel-avatar { width: 40px; height: 40px; }

  .cabinet-tab { padding: 8px 16px; font-size: 13px; }


  .section-header { padding: 16px 12px 6px; }
  .section-header h2 { font-size: 17px; }

  .reel-card { flex: 0 0 130px; width: 130px; height: 232px; }
  .reel-card-large { flex: 0 0 160px; width: 160px; height: 284px; }

  button[type="submit"] { padding: 8px 16px; font-size: 13px; }

  .video-page-container { padding: 8px; gap: 12px; }
  .video-sidebar h2 { font-size: 14px; }

  .video-grid-watch .video-thumbnail { width: 140px; }
  .video-grid-watch .video-info h3 { font-size: 12px; }

  .image-upload-container { flex-direction: column; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.1rem; }
  .mobile-nav-links { padding: 56px 10px 20px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 6px 8px; }
  .product-card .product-image { aspect-ratio: 1/1; }
  .product-card .product-info { padding: 8px 10px; }
  .product-card .product-name { font-size: 12px; }
  .product-card .product-price { font-size: 14px; }

  /* reels-grid removed — TikTok feed used */

  .video-grid { grid-template-columns: 1fr; gap: 12px; }

  .reel-card { flex: 0 0 110px; width: 110px; height: 196px; }
  .reel-card-large { flex: 0 0 140px; width: 140px; height: 250px; }

  .subscribe-btn { width: 100%; justify-content: center; }
  .settings-section { padding: 16px; }

  .upload-container { margin: 12px 8px; padding: 16px; }

  .channel-form { margin: 12px 8px; padding: 20px; }
}

/* ====== OVERLAY for mobile nav ====== */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.3s, visibility 0.3s;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-nav-overlay.activex {
  opacity: 1;
  visibility: visible;
}

/* ====== LOGIN/REGISTER CONTAINER ====== */
.login-container {
  max-width: 420px;
  margin: 24px auto;
  padding: 32px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-container h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.login-container .google-btn {
  width: 100%;
  border-radius: 20px;
  height: 44px;
}

.login-container .google-text {
  line-height: 44px;
}

.login-container .google-icon {
  height: 44px;
}

.login-container hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.login-container p {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.login-container p a {
  color: var(--primary);
  font-weight: 600;
}

/* ====== WATCH PAGE — Yashil tema (asosiy sahifa bilan bir xil) ====== */
body.watch-page .video-info-container {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 12px;
  box-shadow: var(--shadow);
}

body.watch-page .video-description {
  background: var(--primary-light);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 10px;
}

body.watch-page .comments-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow);
}

body.watch-page .comments-section textarea {
  background: #f5f5f5;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
}

body.watch-page .comments-section textarea:focus {
  border-color: var(--primary);
}

body.watch-page .comment {
  border-bottom: 1px solid var(--border);
}

body.watch-page .video-sidebar {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* ====== HOMEPAGE CONTRAST FIX ====== */
.video-card {
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
}

.video-card:hover {
  box-shadow: var(--shadow-hover);
}

.navbar {
  border-bottom: 1px solid var(--border);
}

.slider-container {
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
}

.reel-card {
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.channel-form {
  border: 1px solid var(--border);
}

.upload-container {
  border: 1px solid var(--border);
}

.settings-section {
  border: 1px solid var(--border);
}

.cabinet-menu {
  border: 1px solid var(--border);
}

.channel-card {
  border: 1px solid var(--border);
}

.login-container {
  border: 1px solid var(--border);
}


/* ====== REELS PAGE — Yashil tema (asosiy sahifa bilan bir xil) ====== */
/* Reels viewer (fullscreen) qora qoladi, qolgan sahifa yashil */

/* ====== PRODUCT PAGE ====== */
body.product-page {
  background: #FAFAFA;
  position: relative;
}

/* ====== GUL ANIMATSIYA — O'chirilgan ====== */
body::before {
  display: none;
}

body > *:not(script) {
  position: relative;
  z-index: 1;
}

/* Mayda gulchalar — o'chirilgan */
.flower-fall {
  display: none;
}

.flower-fall span {
  position: absolute;
  top: -40px;
  width: 18px;
  height: 18px;
  animation: flowerDrop linear infinite;
  opacity: 0.45;
}

.flower-fall span img {
  width: 100%;
  height: 100%;
  display: block;
}

.flower-fall span:nth-child(1)  { left: 5%;  width: 16px; height: 16px; animation-duration: 12s; animation-delay: 0s; }
.flower-fall span:nth-child(2)  { left: 15%; width: 22px; height: 22px; animation-duration: 15s; animation-delay: 2s; }
.flower-fall span:nth-child(3)  { left: 25%; width: 14px; height: 14px; animation-duration: 10s; animation-delay: 4s; }
.flower-fall span:nth-child(4)  { left: 35%; width: 24px; height: 24px; animation-duration: 18s; animation-delay: 1s; }
.flower-fall span:nth-child(5)  { left: 45%; width: 16px; height: 16px; animation-duration: 13s; animation-delay: 3s; }
.flower-fall span:nth-child(6)  { left: 55%; width: 20px; height: 20px; animation-duration: 16s; animation-delay: 5s; }
.flower-fall span:nth-child(7)  { left: 65%; width: 14px; height: 14px; animation-duration: 11s; animation-delay: 0.5s; }
.flower-fall span:nth-child(8)  { left: 75%; width: 22px; height: 22px; animation-duration: 14s; animation-delay: 3.5s; }
.flower-fall span:nth-child(9)  { left: 85%; width: 16px; height: 16px; animation-duration: 17s; animation-delay: 2.5s; }
.flower-fall span:nth-child(10) { left: 95%; width: 18px; height: 18px; animation-duration: 12s; animation-delay: 4.5s; }

@keyframes flowerDrop {
  0% {
    top: -40px;
    transform: rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    top: 105vh;
    transform: rotate(360deg) translateX(30px);
    opacity: 0;
  }
}

/* Reels viewer ichida gullar ko'rinmasin */
/* flower-fall removed */

/* BARCHA sahifalar uchun yagona fon */
body.product-page {
  background: #FAFAFA;
}

/* ====== SAVATCHA BADGE ====== */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ff1744;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  z-index: 5;
}
.cart-badge-mobile {
  top: -8px;
  right: -6px;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
}

/* ====== SOTIB OLISH TUGMALARI ====== */
.product-buy-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-add-cart:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-buy-now {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #ff6d00;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}
.btn-buy-now:hover { background: #e65100; transform: translateY(-1px); }

/* ====== PRODUCT CARD MINI CART ====== */
.product-card-wrapper { position: relative; }
.product-card-wrapper .product-card { display: block; text-decoration: none; }
.product-cart-mini {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.product-cart-mini:hover { background: var(--primary-dark); }

/* ====== SAVATCHA SAHIFASI ====== */
.cart-container {
  max-width: 800px;
  margin: 24px auto;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cart-container h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--text);
}
.cart-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-light);
}
.cart-empty p { margin-top: 12px; font-size: 16px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.cart-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.cart-item-image { flex-shrink: 0; }
.cart-item-image img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.cart-item-seller { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.cart-item-price { font-size: 14px; color: var(--primary); font-weight: 600; margin-top: 4px; }
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cart-quantity {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}
.qty-btn:hover { background: var(--primary-light); }
.qty-value {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  background: #fff;
}
.cart-item-total { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.cart-item-remove {
  background: none;
  border: none;
  color: #ff1744;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: var(--transition);
}
.cart-item-remove:hover { transform: scale(1.2); }
.cart-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
}
.cart-summary-row strong { color: var(--primary); font-size: 22px; }

/* ====== CHECKOUT ====== */
.checkout-container {
  max-width: 700px;
  margin: 24px auto;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.checkout-container h2 {
  font-size: 20px;
  margin-bottom: 20px;
}
.checkout-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.checkout-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text);
}
.payment-methods {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-method-label {
  flex: 1;
  min-width: 140px;
  cursor: pointer;
}
.payment-method-label input[type="radio"] { display: none; }
.payment-method-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: #fff;
}
.payment-method-card span { font-weight: 600; font-size: 14px; }
.payment-method-label input[type="radio"]:checked + .payment-method-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}
.checkout-items { display: flex; flex-direction: column; gap: 10px; }
.checkout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.checkout-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.checkout-item-info { flex: 1; min-width: 0; }
.checkout-item-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkout-item-qty { font-size: 12px; color: var(--text-light); }
.checkout-item-total { font-size: 14px; font-weight: 600; white-space: nowrap; }
.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 17px;
}
.checkout-total strong { color: var(--primary); font-size: 20px; }

/* ====== BUYURTMALAR ====== */
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.order-card-items { padding: 12px 16px; }
.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 8px;
}
.order-card-actions {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pending { background: #fff3e0; color: #e65100; }
.status-paid { background: #e3f2fd; color: #1565c0; }
.status-shipped { background: #f3e5f5; color: #7b1fa2; }
.status-delivered { background: #e8f5e9; color: #2e7d32; }
.status-cancelled { background: #ffebee; color: #c62828; }

/* ====== VIDEO LINKED PRODUCT ====== */
.video-linked-product {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.linked-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}
.linked-product-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.linked-product-card img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}
.linked-product-info { flex: 1; min-width: 0; }
.linked-product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.linked-product-price {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 700;
}

/* ====== REEL PRODUCT BAR ====== */
/* old reel-product-bar removed — rf-product-bar used */

/* ====== ADMIN LAYOUT ====== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-content { flex: 1; padding: 24px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item-actions {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
  }
  .checkout-container, .cart-container {
    margin: 12px;
    padding: 16px;
  }
  .product-buy-actions {
    flex-direction: column;
  }
  .product-buy-actions .btn-add-cart,
  .product-buy-actions .btn-buy-now {
    width: 100%;
    justify-content: center;
  }
  .payment-methods {
    flex-direction: column;
  }
}

/* ====== STORIES (Instagram-style) ====== */
.stories-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories-bar::-webkit-scrollbar { display: none; }

.story-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.story-circle .story-avatar-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #333, #000, #333, #000, #222);
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-circle .story-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
}

.story-circle .story-name {
  font-size: 11px;
  max-width: 72px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.story-add {
  text-decoration: none;
  color: var(--text);
}
.story-add .story-avatar-ring {
  background: var(--border) !important;
  position: relative;
}
.story-add .story-avatar-ring img {
  border: 3px solid #fff;
}
.story-add .story-add-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}

/* Stories Viewer — Fullscreen Overlay */
.stories-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.stories-viewer.active { display: flex; }

.sv-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sv-progress-bars {
  display: flex;
  gap: 3px;
  padding: 8px 8px 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.sv-progress-seg {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

.sv-progress-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  border-radius: 2px;
}

.sv-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 8px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}

.sv-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.sv-header .sv-channel-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.sv-header .sv-time {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

.sv-header .sv-close {
  color: #fff;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.sv-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.sv-media img,
.sv-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sv-tap-prev,
.sv-tap-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 5;
  cursor: pointer;
}
.sv-tap-prev { left: 0; }
.sv-tap-next { right: 0; width: 60%; }

/* Responsive */
@media (max-width: 480px) {
  .story-circle .story-avatar-ring {
    width: 60px;
    height: 60px;
  }
  .story-circle .story-name {
    font-size: 10px;
    max-width: 64px;
  }
  .stories-bar { gap: 12px; padding: 10px 12px; }
  .sv-container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* ====== INSTAGRAM FEED ====== */
.ig-feed {
  max-width: 470px;
  margin: 0 auto;
  padding: 0 0 20px;
}
.ig-post {
  background: #fff;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* Post Header */
.ig-post-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
}
.ig-post-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.ig-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ig-post-user {
  flex: 1;
  min-width: 0;
}
.ig-post-username {
  font-weight: 600;
  font-size: 14px;
  display: block;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ig-post-time {
  font-size: 12px;
  color: var(--text-light);
}
.ig-post-badge {
  font-size: 18px;
  color: #262626;
  flex-shrink: 0;
}
.ig-badge-shop {
  color: #262626;
}

/* Post Media */
.ig-post-media {
  display: block;
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}
.ig-post-media > img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
/* Video wrapper: poster ustida, video pastda */
.ig-video-wrap {
  position: relative;
}
.ig-video-wrap video {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.ig-video-wrap .ig-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.ig-post-reel video {
  aspect-ratio: 9 / 16;
  max-height: 580px;
  margin: 0 auto;
}
.ig-post-reel .ig-poster {
  object-fit: cover;
}
.ig-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  transition: var(--transition);
  pointer-events: none;
  z-index: 2;
}
.ig-mute-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  z-index: 3;
}

/* Post Actions */
.ig-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 4px;
}
.ig-actions-left {
  display: flex;
  gap: 14px;
  align-items: center;
}
.ig-action-btn {
  font-size: 24px;
  color: #262626;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.2s ease;
}
.ig-action-btn:hover { transform: scale(1.15); }
.ig-like-btn.liked { color: #ed4956; }
.ig-like-btn.liked i { animation: igLikePop 0.3s ease; }
@keyframes igLikePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.ig-actions-right { display: flex; gap: 12px; }
.ig-actions-right a,
.ig-actions-right button {
  font-size: 22px;
  color: #262626;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Post Info */
.ig-post-info {
  padding: 0 12px 10px;
}
.ig-post-stats {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.ig-post-price {
  font-weight: 700;
  font-size: 16px;
  color: #000;
  margin-bottom: 4px;
}
.ig-post-caption {
  font-size: 14px;
  line-height: 1.4;
  color: #262626;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ig-caption-user {
  font-weight: 600;
  margin-right: 5px;
}
.ig-post-comment-count {
  font-size: 14px;
  color: #8e8e8e;
  margin-top: 4px;
  cursor: pointer;
}
.ig-post-views {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* Comments */
.ig-comments {
  border-top: 1px solid #efefef;
  padding: 8px 12px 12px;
}
.ig-comments-list {
  max-height: 200px;
  overflow-y: auto;
}
.ig-comment-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.4;
  align-items: flex-start;
}
.ig-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ig-comment-item strong {
  margin-right: 4px;
}
.ig-comment-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.ig-comment-input {
  flex: 1;
  border: 1px solid #dbdbdb;
  border-radius: 22px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
}
.ig-comment-input:focus {
  border-color: #262626;
  background: #fff;
}
.ig-comment-send {
  background: none;
  border: none;
  font-size: 26px;
  color: #0095f6;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.ig-comment-login {
  padding: 8px 0;
  font-size: 13px;
  color: #999;
}
.ig-comment-login a {
  color: #0095f6;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 480px) {
  .ig-feed { max-width: 100%; }
  .ig-post { border-radius: 0; }
  .ig-post-reel .ig-poster,
  .ig-post-reel video { max-height: 480px; }
}

/* ====== INSTAGRAM PROFILE PAGE ====== */
.profile-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 24px 16px 16px;
  margin: -16px -16px 0;
}
.profile-top {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}
.profile-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  cursor: pointer;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #dbdbdb;
}
.avatar-edit-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 2px solid #fff;
}
.profile-stats {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
}
.profile-stat {
  text-align: center;
}
.profile-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.profile-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.profile-info {
  margin-bottom: 14px;
}
.profile-username {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.profile-channel-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.profile-email {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}
.profile-bio {
  font-size: 13px;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.4;
}
.profile-contact {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-contact a {
  color: var(--text);
  font-weight: 600;
}
.profile-contact i {
  font-size: 12px;
  color: var(--text-light);
}
.profile-social-links {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.social-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  color: #555;
  background: #f5f5f5;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
}
.social-link-icon .bi-telephone-fill { color: #333; }
.social-link-icon .bi-geo-alt-fill { color: #E74C3C; }
.social-link-icon .bi-telegram { color: #26A5E4; }
.social-link-icon .bi-instagram { color: #E4405F; }
.social-link-icon .bi-youtube { color: #FF0000; }
.social-link-icon:hover { background: #eee; }

.profile-actions {
  display: flex;
  gap: 8px;
}
.profile-actions .prof-btn {
  flex: 1;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid #dbdbdb;
  background: #fafafa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}
.profile-actions .prof-btn:hover {
  background: #efefef;
}
/* Three-dots menu */
.profile-dots-wrap {
  position: relative;
}
.prof-dots-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #dbdbdb;
  background: #fafafa;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s;
}
.prof-dots-btn:hover {
  background: #efefef;
}
.prof-dots-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 50;
  overflow: hidden;
}
.prof-dots-menu.open {
  display: block;
}
.prof-dots-menu button,
.prof-dots-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.prof-dots-menu button:hover,
.prof-dots-menu a:hover {
  background: #f5f5f5;
}
.prof-dots-menu a:last-child {
  color: #ed4956;
  border-top: 1px solid var(--border);
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: #fff;
  margin: 0 -16px;
}
.profile-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: color 0.2s;
}
.profile-tab:hover {
  color: var(--text);
}
.profile-tab.active {
  color: var(--text);
}
.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #000;
}

/* Profile Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 0 -16px;
}
.profile-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: #efefef;
}
.profile-grid-item img,
.profile-grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-grid-item .grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.profile-grid-item:hover .grid-overlay {
  opacity: 1;
}
.grid-price-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.grid-play-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.grid-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(237,73,86,0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}
.profile-grid-item:hover .grid-delete-btn {
  opacity: 1;
}
.profile-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--text-light);
  font-size: 14px;
}

/* Video edit panel (toggled) */
.video-edit-panel {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  padding: 14px;
  margin: 0;
  display: none;
}
.video-edit-panel.active {
  display: block;
}
.video-edit-panel .form-group {
  margin-bottom: 10px;
}
.video-edit-panel input,
.video-edit-panel textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.video-edit-panel .edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.video-edit-panel .btn-save {
  padding: 6px 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.video-edit-panel .btn-delete {
  padding: 6px 16px;
  background: #ed4956;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* Profile content sections */
.profile-section {
  display: none;
}
.profile-section.active {
  display: block;
}

@media (max-width: 480px) {
  .profile-header { padding: 16px 12px 12px; margin: -12px -12px 0; }
  .profile-avatar-wrap { width: 64px; height: 64px; }
  .profile-avatar { width: 64px; height: 64px; }
  .profile-stats { gap: 12px; }
  .profile-stat-num { font-size: 15px; }
  .profile-stat-label { font-size: 11px; }
  .profile-top { gap: 16px; }
  .profile-info { margin-bottom: 10px; }
  .profile-username { font-size: 14px; }
  .profile-bio { font-size: 12px; }
  .profile-contact { font-size: 12px; }
  .profile-actions { gap: 6px; }
  .profile-actions .prof-btn { font-size: 12px; padding: 6px 10px; }
  .prof-dots-btn { width: 32px; height: 32px; font-size: 16px; }
  .profile-tabs { margin: 0 -12px; }
  .profile-tab { padding: 12px 0; font-size: 18px; }
  .profile-grid { margin: 0 -12px; gap: 2px; }
}

/* ====== CONVERSATIONS & CHAT (Instagram DM) ====== */

/* Conversations list */
.conv-list {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
}
.conv-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.conv-item:hover {
  background: #fafafa;
}
.conv-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.conv-info {
  flex: 1;
  min-width: 0;
}
.conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.conv-name {
  font-weight: 600;
  font-size: 14px;
  color: #000;
}
.conv-meta {
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
}
.conv-subtitle {
  font-size: 13px;
  color: #666;
  margin-bottom: 2px;
}
.conv-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.conv-last-msg {
  color: #999;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.conv-last-msg.unread {
  color: #000;
  font-weight: 600;
}
.conv-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
  flex-shrink: 0;
}
.conv-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.conv-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

/* Chat page */
.chat-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 10px 16px;
  z-index: 100;
}
.chat-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-header .chat-back {
  font-size: 22px;
  color: #000;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.chat-header-name {
  font-weight: 600;
  font-size: 15px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-header-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}
.chat-header-status.status-paid { background: #e8f5e9; color: #2e7d32; }
.chat-header-status.status-pending { background: #fff3e0; color: #e65100; }
.chat-header-status.status-shipped { background: #e3f2fd; color: #1565c0; }
.chat-header-status.status-delivered { background: #e8f5e9; color: #1b5e20; }
.chat-header-status.status-cancelled { background: #fce4ec; color: #c62828; }

.chat-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(100vh - 190px);
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}
.chat-bubble .chat-time {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.6;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: #000;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.mine .chat-time {
  text-align: right;
  color: rgba(255,255,255,0.6);
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: #f0f0f0;
  border-bottom-left-radius: 4px;
}
.chat-bubble.system {
  align-self: center;
  background: #f5f5f5;
  color: #666;
  font-size: 13px;
  text-align: center;
  padding: 10px 20px;
  border-radius: 12px;
  max-width: 85%;
}
/* Status o'zgarish kartochkalari */
.chat-status-card {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  max-width: 85%;
  margin: 4px 0;
}
.chat-status-card .status-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.chat-status-card .status-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.chat-status-card .status-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}
/* Yuborildi — binafsha */
.chat-status-card.shipped {
  background: #f3e5f5;
  color: #6a1b9a;
}
.chat-status-card.shipped .status-icon {
  background: #ce93d8;
  color: #fff;
}
/* Yetkazildi — yashil */
.chat-status-card.delivered {
  background: #e8f5e9;
  color: #2e7d32;
}
.chat-status-card.delivered .status-icon {
  background: #66bb6a;
  color: #fff;
}
/* Bekor — qizil */
.chat-status-card.cancelled {
  background: #fce4ec;
  color: #c62828;
}
.chat-status-card.cancelled .status-icon {
  background: #ef5350;
  color: #fff;
}
/* To'langan — ko'k */
.chat-status-card.paid {
  background: #e3f2fd;
  color: #1565c0;
}
.chat-status-card.paid .status-icon {
  background: #42a5f5;
  color: #fff;
}
/* Kutilmoqda — sariq */
.chat-status-card.pending {
  background: #fff3e0;
  color: #e65100;
}
.chat-status-card.pending .status-icon {
  background: #ffa726;
  color: #fff;
}
.chat-order-card {
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px;
  margin: 0 auto 8px;
  max-width: 90%;
  width: 100%;
}
.chat-order-card h4 {
  font-size: 14px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-order-card .order-line {
  font-size: 13px;
  color: #444;
  padding: 2px 0;
}
.chat-order-card .order-total {
  font-weight: 700;
  font-size: 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
}

/* Status chips in header */
.chat-header-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.chat-status-chip {
  padding: 3px 10px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chat-status-chip i {
  font-size: 10px;
}
.chat-status-chip:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}
.chat-status-chip.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Chat input bar */
.chat-input-bar {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  z-index: 100;
  max-width: 600px;
  margin: 0 auto;
}
.chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.chat-input:focus {
  border-color: #000;
}
.chat-send-btn {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.chat-send-btn:hover {
  opacity: 0.8;
}

/* Messages page title */
.messages-page-title {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 16px 0;
  font-size: 18px;
  font-weight: 700;
}
