@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}



.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.logo {
  font-weight: 700;
  font-size: 20px;
}

.topbar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--card);
  color: var(--text);
  border: none;
  border-radius: 10px;
  outline: none;
}

.topbar button {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.layout {
  display: flex;
  height: calc(100vh - 60px);
}

.feed {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px;
  height: 1600px;
}

.viewer {
  flex: 1;
  border: 1px solid var(--border);
}

.viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-card {
  background: var(--card);
  color: var(--text);
  border-radius: 16px;
  cursor: pointer;
  transition: transform .2s ease;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-card video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  pointer-events: none;
  preload: metadata;
}

.video-info {
  padding: 10px 12px;
}

.video-title {
  font-weight: 600;
  font-size: 14px;
}

.video-owner {
  font-size: 12px;
  opacity: .7;
  margin-top: 4px;
    color: var(--muted);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  padding: 20px;
  border-radius: 16px;
  width: 300px;
}

.modal-content h2 {
  margin-bottom: 16px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background: #333;
  border: none;
  border-radius: 8px;
  color: #fff;
}

.modal-content button {
  width: 100%;
  padding: 10px;
  background: #ff2d55;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

#userResults {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.user-result {
  padding: 10px;
  border-bottom: 1px solid #333;
  cursor: pointer;
}

.user-result:hover {
  background: #333;
}

.hidden {
  display: none;
}

@media (max-width: 600px) {
  .topbar {
    gap: 8px;
    padding: 8px 12px;
  }
  .topbar button {
    padding: 8px 12px;
    font-size: 14px;
  }
  .feed {
    padding: 10px;
    gap: 8px;
  }
}
.recommended { width: 250px; padding: 16px;   background: var(--card);
  color: var(--text);
 border-radius: 12px; position: sticky; top: 16px; }

.recommended h2 {
  margin-bottom: 12px;
  font-size: 18px;
}


/* ---------- MOBILE SPECIFIC ---------- */
@media (max-width: 768px) {
  .layout { flex-direction: column; height: auto; }
  .feed { grid-template-columns: 1fr; padding: 12px; }
  .viewer { display: none; }
  .recommended { width: 100%; position: static; margin-top: 10px; border-radius: 0; }
  
  /* Bottom Navigation */
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #1c1c1c;
    border-top: 1px solid #333;
    padding: 10px 0;
    z-index: 1000;
  }
  .bottom-nav button {
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
  }

  /* Video Modal */
  .video-modal-content {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  #modalVideo { width: 100%; height: 100%; object-fit: cover; }
/* Kapat butonu */
.closeModal {
  position: absolute;
  top: 16px; /* üstten boşluk */
  right: 16px; /* sağdan boşluk */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 45, 85, 0.9); /* kırmızı ton, hafif saydam */
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001; /* modal içeriğin üstünde */
  transition: background 0.2s, transform 0.2s;
}

.closeModal:hover {
  background-color: rgba(255, 45, 85, 1);
  transform: scale(1.1);
}

.closeModal:active {
  transform: scale(0.95);
}
}

.recommended .user-card {
  padding: 8px;
  border-radius: 8px;
  background-color: #2a2a2a;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.recommended .user-card:hover {
  background-color: #3a3a3a;
}

/* =========================
   MOBILE DESIGN (<= 768px)
   ========================= */
@media (max-width: 768px) {

  /* Genel */
  body {
    overflow-x: hidden;
  }

  /* Topbar */
  .topbar {
    gap: 8px;
  }

  .logo {
    font-size: 16px;
  }

  #searchInput {
    font-size: 14px;
    padding: 8px 10px;
  }

  /* Upload + Download gizle (APK istemeyenler için) */
  #uploadBtn,
  #downloadApkBtn {
    display: none !important;
  }

  #authBtn {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Layout tek kolon */
  .layout {
    flex-direction: column;
    height: auto;
  }

  /* Video Feed */
  .feed {
    grid-template-columns: 1fr;
    padding: 12px;
    height: auto;
  }

  .video-card video {
    height: 220px;
    border-radius: 14px;
  }

  /* Viewer (iframe) mobilde gizli */
  .viewer {
    display: none;
  }

  /* Recommended Users aşağıya */
  .recommended {
    width: 100%;
    position: static;
    border-radius: 0;
    margin-top: 10px;
  }

  .recommended h2 {
    font-size: 16px;
  }

  .recommended .user-card {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  /* Modal */
  .modal-content {
    width: 90%;
    max-width: 340px;
  }
}

@media (max-width: 768px) {
  .viewer { display: none; } /* Masaüstü iframe gizlensin */
  .video-modal-content {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  #modalVideo { width: 100%; height: 100%; object-fit: cover; }
/* Kapat butonu */
.closeModal {
  position: absolute;
  top: 16px; /* üstten boşluk */
  right: 16px; /* sağdan boşluk */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 45, 85, 0.9); /* kırmızı ton, hafif saydam */
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001; /* modal içeriğin üstünde */
  transition: background 0.2s, transform 0.2s;
}

.closeModal:hover {
  background-color: rgba(255, 45, 85, 1);
  transform: scale(1.1);
}

.closeModal:active {
  transform: scale(0.95);
}
}
@media (max-width: 768px) {
  .recommended {
    width: 100%;
    position: static;
    border-radius: 0;
    margin-top: 10px;
  }
}
@media (max-width: 768px) {
  /* Üst arama gizle */
  #searchInput {
    display: none;
  }
}
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #1c1c1c;
    border-top: 1px solid #333;
    padding: 10px 0;
    z-index: 1000;
  }
  .bottom-nav button {
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .profile-modal-content {
    width: 100%;
    height: 100%;
    background: #0f0f0f;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
    position: relative;
  }
  #profileInfo {
    margin-bottom: 16px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
  }
  #profileInfo h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }
  #profileInfo p {
    font-size: 14px;
    opacity: 0.8;
  }
  #profileVideos .video-card video {
    height: 180px;
  }
}

.search-box {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  background: #111;
  border-radius: 10px;
  padding: 10px;
  z-index: 2000;
}

.search-section h4 {
  margin: 6px 0;
  font-size: 13px;
  color: #aaa;
}

.search-item {
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
}

.search-item:hover {
  background: #222;
}

.hidden {
  display: none;
}

.beta-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  background: linear-gradient(90deg, #ff2d55, #ff6a00);
  color: #fff;
}

:root {
  --bg: #0f0f0f;
  --card: #181818;
  --text: #ffffff;
  --muted: #aaaaaa;
  --accent: #ff2d55;
  --border: #222;
}

body.light {
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #111;
  --muted: #555;
  --border: #ddd;
}
.icon {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s, transform 0.2s;
}

.icon-text-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}


.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
/* GLOBAL THEME FIX */
.dropdown,
.modal-content,
.search-box {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.dropdown div,
.modal-content div {
  color: var(--text);
}

.dropdown div:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
/* AUTH DROPDOWN */
.auth-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  z-index: 1000;
}

.auth-item {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}

.auth-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.auth-item:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-content.modern-modal {
  background: #1e1e2f;
  color: #fff;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  text-align: left;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content.modern-modal {
  transform: translateY(0);
}

.modal-content.modern-modal h2 {
  font-size: 26px;
  margin-bottom: 15px;
  color: #ffd700;
}

.modal-content.modern-modal h3 {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #ffcc00;
}

.modal-content.modern-modal ul {
  list-style: disc;
  padding-left: 20px;
}

.modal-content.modern-modal .download-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.modal-content.modern-modal button {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.playstore-btn {
  background: #3ddc84;
  color: #fff;
}

.playstore-btn:hover {
  background: #34c370;
}

.apk-btn {
  background: #ff5722;
  color: #fff;
}

.apk-btn:hover {
  background: #e64a19;
}

.closeModal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
}

.modal-content.modern-modal .note {
  font-size: 12px;
  margin-top: 15px;
  color: #aaa;
}
.modern-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modern-close:hover {
  background: rgba(0,0,0,0.8);
}

.modern-close svg {
  display: block;
}

/* Telefonla giriş ve OTP modal */
#otpModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#otpModal .modal-content {
  background: #1a1a1a;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  color: #fff;
  position: relative;
}

#otpModal input {
  width: 80%;
  padding: 10px 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  font-size: 16px;
}

#otpModal button {
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #ff4d4d;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

#otpModal button:hover {
  background: #ff1a1a;
}

#otpDiv {
  margin-top: 15px;
}

#otpModal h2 {
  margin-bottom: 15px;
}

#otpModal .closeModal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

#recaptcha-container {
  margin-top: 10px;
}