/* Minimal app styles for SPA views and floating nav */
:root {
  --bg: #0f0f10;
  --card: #1a1b1e;
  --text: #f4f5f7;
  --muted: #9aa0a6;
  --primary: #4c8bf5;
}

body { 
  background: #fff;
  color: #000;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
}

/* Auth views (login/register/prehome) */
.auth-view { 
  max-width: 420px; 
  margin: 0 auto; 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  padding: 16px;
  background: #fff;
}
.auth-view h2 { margin: 8px 0 16px; font-weight: 600; color: #000; }
.auth-view form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.auth-view input[type="text"],
.auth-view input[type="email"],
.auth-view input[type="password"],
.auth-view input[type="file"] { 
  width: 100%; 
  padding: 12px; 
  border-radius: 10px; 
  border: 1px solid #ddd; 
  background: #fff; 
  color: #000; 
}
.auth-view button[type="submit"] { 
  padding: 12px; 
  border: none; 
  border-radius: 8px; 
  background: #000; 
  color: #fff; 
  cursor: pointer; 
  font-weight: 600; 
}
.auth-view button[type="submit"]:hover { background: #333; }
.auth-view button[type="submit"]:disabled { background: #ccc; cursor: not-allowed; }
.logo { width: 120px; height: auto; }
.switch { color: #666; margin-top: 10px; }
.switch a { color: #000; text-decoration: none; font-weight: 600; }
.error { color: #f44336; white-space: pre-wrap; margin-top: 8px; text-align: center; }
.hint { color: #666; font-size: 13px; }
.ok { color: #4caf50; }
.invalid { border-color: #f44336 !important; }

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #856404;
  width: 100%;
}

/* App View */
#appView {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
}

#appContent {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px;
}

/* ===================== FEED HEADER ===================== */
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.feed-username {
  font-size: 16px;
  font-weight: 500;
  color: #000;
}

.btn-menu {
  background: none;
  border: none;
  font-size: 24px;
  color: #000;
  cursor: pointer;
  padding: 8px;
}

/* ===================== PROFILE CARD ===================== */
.profile-card {
  background: #fff;
  padding: 24px 16px;
  text-align: center;
}

.avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0 0 8px 0;
}

.profile-bio {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

/* Stats */
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 0 20px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: #000;
}

.stat-label {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}

/* Action Buttons */
.profile-buttons {
  display: flex;
  gap: 12px;
  padding: 0 16px;
}

.btn-profile-action {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-black {
  background: #000;
  color: #fff;
}

.btn-black:hover {
  background: #333;
}

.btn-gray {
  background: #e0e0e0;
  color: #000;
}

.btn-gray:hover {
  background: #d0d0d0;
}

/* ===================== TABS ===================== */
.tabs-bar {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
  flex: 1;
  padding: 16px;
  background: #fff;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  color: #000;
  border-bottom-color: #000;
}

/* ===================== FEED GRID ===================== */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #fafafa;
}

.feed-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: #f0f0f0;
}

.feed-item img,
.feed-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-item:active {
  opacity: 0.8;
}

.feed-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
}

.coming-soon {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 14px;
  font-style: italic;
}

/* Floating bottom nav with 100% circular buttons */
.floating-nav {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  display:flex; gap:14px; padding: 8px 10px; background: rgba(18,18,20,0.9);
  backdrop-filter: blur(10px); border: 1px solid #2a2d31; border-radius: 999px;
  z-index: 10;
}
.nav-btn {
  width:52px; height:52px; border-radius: 50%; border: 1px solid #2f3238;
  background: #1d1f24; color: var(--text); display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.nav-btn:hover { transform: translateY(-2px); background:#23262c; border-color:#3a3e45; }
.nav-icon { font-size: 20px; line-height: 1; }

/* Apply circular style to plain buttons inside floating nav */
.floating-nav button { width:52px; height:52px; border-radius: 50%; border: 1px solid #2f3238; background: #1d1f24; color: var(--text); cursor: pointer; }
.floating-nav button:hover { transform: translateY(-2px); background:#23262c; border-color:#3a3e45; }

.google-btn {
  margin-top: 8px; width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #ddd;
  background: #fff; color: #000; cursor:pointer; font-weight:600;
}
.google-btn:hover { background:#f5f5f5; }

/* ===================== RESPONSIVE ===================== */
@media (min-width: 768px) {
  #appView {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
  }
}

@media (max-width: 480px) {
  .profile-card {
    padding: 16px 12px;
  }

  .profile-buttons {
    padding: 0 12px;
  }

  .avatar {
    width: 80px;
    height: 80px;
  }
}