/* === APP NAV === */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--fg); }

.nav-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0a0a0c;
  background: var(--accent-blue);
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-btn:hover { opacity: 0.85; }

.nav-btn-ghost {
  font-size: 0.875rem;
  color: var(--fg-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-main);
  transition: color 0.2s;
}
.nav-btn-ghost:hover { color: var(--fg); }

/* === APP SHELL === */
.app-main {
  min-height: 100vh;
  padding-top: 60px;
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* === PAGE HEADER === */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.page-header p {
  color: var(--fg-dim);
  font-size: 0.95rem;
}

/* === STATS CARDS === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.stat-card .card-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.stat-card .card-label {
  display: block;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.stat-card.accent-red { border-top: 2px solid var(--accent-red); }
.stat-card.accent-blue { border-top: 2px solid var(--accent-blue); }
.stat-card.accent-green { border-top: 2px solid #22c55e; }

/* === SECTION CARDS === */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-card-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
}

.section-card-header a {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  text-decoration: none;
}
.section-card-header a:hover { opacity: 0.8; }

/* === RIDE LIST === */
.ride-list { list-style: none; }

.ride-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  text-decoration: none;
  color: var(--fg);
}
.ride-item:last-child { border-bottom: none; }
.ride-item:hover { background: rgba(255,255,255,0.02); }

.ride-item-left { display: flex; flex-direction: column; gap: 0.25rem; }

.ride-title {
  font-size: 0.95rem;
  font-weight: 500;
}

.ride-date {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}

.ride-item-right {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.ride-stat {
  text-align: right;
}

.ride-stat .val {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.ride-stat .lbl {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  text-transform: uppercase;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.9rem;
}

.empty-state a {
  color: var(--accent-blue);
  text-decoration: none;
}

/* === VIDEO GRID === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
}

.video-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s, transform 0.2s;
}
.video-card:hover {
  border-color: rgba(0,180,216,0.3);
  transform: translateY(-2px);
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a1f;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: absolute;
  color: rgba(255,255,255,0.7);
}

.video-info {
  padding: 0.85rem 1rem;
}

.video-info .vid-title {
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-info .vid-meta {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
}

/* === FORMS === */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  max-width: 480px;
}

.form-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.form-card .form-sub {
  font-size: 0.875rem;
  color: var(--fg-dim);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(0,180,216,0.5);
}

.form-group input[type="file"] {
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: var(--accent-blue);
  color: #0a0a0c;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  padding: 0.8rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-danger {
  background: var(--accent-red);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-danger:hover { opacity: 0.8; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--fg);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.15); }

.alert {
  padding: 0.8rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.alert-error {
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.3);
  color: #f87171;
}

.alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
}

.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--fg-dim);
}

.form-footer a {
  color: var(--accent-blue);
  text-decoration: none;
}

/* === AUTH CENTERED === */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* === PROFILE === */
.profile-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-joined {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

/* === VIDEO PLAYER === */
.player-container {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/9;
}

.player-container video {
  width: 100%;
  height: 100%;
}

/* === UPLOAD ZONE === */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}
.upload-zone:hover { border-color: rgba(0,180,216,0.4); }
.upload-zone p { color: var(--fg-dim); font-size: 0.9rem; margin-bottom: 1rem; }

/* === BADGE === */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  text-transform: uppercase;
}

.badge-blue {
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
  border: 1px solid rgba(0,180,216,0.2);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .ride-item-right { gap: 1rem; }
  .app-container { padding: 2rem 1rem; }
  .profile-hero { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 0.75rem; }
}
