@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  --bg-gradient: linear-gradient(135deg, #fdfbf7 0%, #f4f0e6 100%);
  --surface: rgba(255, 255, 255, 0.75);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(43, 40, 35, 0.07);
  --border-hover: rgba(217, 106, 64, 0.25);
  --neon-lime: #d96a40; /* Terracotta Primary Accent */
  --accent-light: #f7ede8;
  --neon-glow: 0 4px 20px rgba(217, 106, 64, 0.1);
  --neon-glow-strong: 0 4px 30px rgba(217, 106, 64, 0.2);
  --text-main: #2e2c29; /* Soft Charcoal */
  --text-sub: #7a7670;  /* Warm Sand Muted Text */
  --text-dark: #ffffff; /* White text for buttons/badges */
  --glass-blur: blur(16px);
  --font-family: 'Outfit', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: #f4f0e6;
  background-image: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-lime);
}

/* Grid & Structure */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header & Brand */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 10px 40px rgba(43, 40, 35, 0.06);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-container {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--neon-lime);
  overflow: hidden;
  transition: var(--transition);
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.brand:hover .logo-container {
  transform: rotate(10deg) scale(1.05);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--neon-lime) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-sub);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Premium Buttons */
.btn {
  font-family: var(--font-family);
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: rgba(217, 106, 64, 0.05);
  color: var(--neon-lime);
}

.btn-primary {
  background: var(--neon-lime);
  color: var(--text-dark);
  border: 1px solid var(--neon-lime);
  box-shadow: var(--neon-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--neon-glow-strong);
  filter: brightness(1.05);
}

.btn:not(.btn-primary):hover {
  background: var(--accent-light);
  border-color: var(--neon-lime);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Contributor Filter Nav */
.filter-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
}

.filter-chip {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.filter-chip:hover {
  color: var(--text-main);
  border-color: var(--neon-lime);
}

.filter-chip.active {
  background: var(--neon-lime);
  color: var(--text-dark);
  border-color: var(--neon-lime);
  box-shadow: var(--neon-glow);
}

.btn-add-friend {
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  background: transparent;
  border: 1.5px dashed rgba(0, 0, 0, 0.15);
  color: var(--text-sub);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-add-friend:hover {
  border-color: var(--neon-lime);
  color: var(--neon-lime);
  background: var(--accent-light);
}

/* Video Grid and Sections */
.section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin-left: 1rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Video Card styling */
.video-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(43, 40, 35, 0.04);
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(43, 40, 35, 0.08);
}

/* Video Player Frame */
.video-frame-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  overflow: hidden;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* Custom Video Controls Overlay */
.video-overlay-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.video-card:hover .video-overlay-controls,
.video-frame-container:focus-within .video-overlay-controls {
  opacity: 1;
  pointer-events: auto;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.play-pause-btn, .fullscreen-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.play-pause-btn:hover, .fullscreen-btn:hover {
  color: var(--neon-lime);
  transform: scale(1.1);
}

.timeline-container {
  flex: 1;
  margin: 0 0.75rem;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.timeline-progress {
  height: 100%;
  width: 0;
  background: var(--neon-lime);
  border-radius: 2px;
  position: absolute;
  left: 0;
  top: 0;
}

.time-display {
  font-size: 0.75rem;
  font-family: monospace;
  color: rgba(255,255,255,0.8);
}

/* Video Card Footer */
.video-info-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.video-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-contributor {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--neon-lime);
  background: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  letter-spacing: 0.5px;
}

.video-date {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.video-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.3;
}

/* Reaction Area */
.reactions-bar {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 0.75rem;
  margin-top: auto;
  align-items: center;
}

.reaction-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.reaction-btn:hover {
  background: var(--accent-light);
  border-color: var(--neon-lime);
  color: var(--neon-lime);
}

.reaction-btn.reacted {
  background: var(--neon-lime);
  border-color: var(--neon-lime);
  color: var(--text-dark);
}

.reaction-emoji {
  font-size: 0.95rem;
}

.btn-delete-video {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border-radius: 50%;
  transition: var(--transition);
}

.btn-delete-video:hover {
  color: #d63c3c;
  background: rgba(214, 60, 60, 0.08);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(46, 44, 41, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 28px;
  width: 90%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(43, 40, 35, 0.15);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 1.6rem;
  cursor: pointer;
  transition: var(--transition);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

/* Lightbox Modal Dimensions */
.lightbox-box {
  max-width: 800px;
  width: 95%;
  padding: 1.5rem;
}

.lightbox-video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #050505;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.lightbox-video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select {
  font-family: var(--font-family);
  background: #faf9f6;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--neon-lime);
  background: #ffffff;
}

/* Drag & Drop File Upload Area */
.upload-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  background: rgba(0,0,0,0.01);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--neon-lime);
  background: var(--accent-light);
}

.upload-icon {
  font-size: 1.8rem;
  color: var(--text-sub);
}

.upload-dropzone:hover .upload-icon {
  color: var(--neon-lime);
}

.file-preview {
  display: none;
  width: 100%;
  padding: 0.5rem;
  background: var(--accent-light);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--neon-lime);
  font-weight: 600;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--surface);
  border: 1.5px dashed rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  color: var(--text-sub);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

/* Loading indicators */
.loading-spinner {
  border: 3px solid rgba(217, 106, 64, 0.1);
  border-top: 3px solid var(--neon-lime);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(43, 40, 35, 0.1);
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  animation: slideIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  to {
    transform: translateY(100px);
    opacity: 0;
  }
}

/* Stats Banner styling */
.stats-banner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  backdrop-filter: var(--glass-blur);
  margin-bottom: 0.5rem;
  box-shadow: 0 10px 30px rgba(43, 40, 35, 0.04);
}

.stats-item {
  display: flex;
  flex-direction: column;
}

.stats-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--neon-lime);
}

.stats-lbl {
  font-size: 0.75rem;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.btn-outline-danger {
  border-color: rgba(214, 60, 60, 0.3);
  color: #d63c3c;
  background: transparent;
}
.btn-outline-danger:hover {
  background: rgba(214, 60, 60, 0.05);
  border-color: #d63c3c;
  transform: translateY(-2px);
}

/* Friend Filter Chip Group Redesign */
.filter-chip-group {
  display: flex;
  align-items: center;
  border-radius: 50px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.filter-chip-group:hover {
  border-color: var(--neon-lime);
}

.filter-chip-group.active {
  background: var(--neon-lime);
  border-color: var(--neon-lime);
  box-shadow: var(--neon-glow);
}

.filter-chip-inner {
  padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: var(--font-family);
}

.filter-chip-group:hover .filter-chip-inner {
  color: var(--text-main);
}

.filter-chip-group.active .filter-chip-inner {
  color: var(--text-dark);
}

.btn-delete-friend {
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-right: 0.4rem;
  transition: var(--transition);
  line-height: 1;
}

.btn-delete-friend:hover {
  background: rgba(214, 60, 60, 0.08);
  color: #d63c3c;
}

.filter-chip-group.active .btn-delete-friend {
  color: rgba(255, 255, 255, 0.75);
}

.filter-chip-group.active .btn-delete-friend:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* User Session in Header */
.user-session {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: var(--accent-light);
  border-radius: 30px;
  color: var(--neon-lime);
  font-weight: 700;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 50%;
  transition: var(--transition);
}
.btn-logout:hover {
  color: #d63c3c;
  background: rgba(214, 60, 60, 0.08);
}

/* Lightbox Comments styling */
.lightbox-comments {
  margin-top: 0.5rem;
}

.comments-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.4rem;
  margin-top: 0.5rem;
}

.comment-card {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.03);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--text-main);
}

.comment-date {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-sub);
}

.comment-body {
  color: #4a453f;
  line-height: 1.35;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
    gap: 1.5rem;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1rem;
    text-align: center;
    border-radius: 20px;
    align-items: center;
  }

  .brand {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .brand-info {
    align-items: center;
  }
  
  .brand-title {
    font-size: 1.35rem;
  }
  
  header .btn-primary {
    width: 100%;
    justify-content: center;
  }
  
  /* Stats banner mobile stacked design */
  .stats-banner {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1.25rem;
    border-radius: 16px;
  }
  
  .stats-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 0.4rem;
  }
  
  .stats-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-box {
    padding: 1.5rem;
    width: 95%;
  }
}

.video-duration-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: monospace;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* --- Interactive Goodies Styles --- */



/* Klaxon Button */
.reaction-btn.btn-klaxon {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-main);
  transition: var(--transition);
  padding: 0.35rem 0.6rem;
}
.reaction-btn.btn-klaxon:hover {
  background: var(--accent-light);
  border-color: var(--neon-lime);
  transform: scale(1.1) rotate(5deg);
}
.reaction-btn.btn-klaxon:active {
  transform: scale(0.9);
}

/* Weather Widget in Stats Banner */
.stats-item.weather-widget {
  border-left: 1px solid var(--border-color);
  padding-left: 2rem;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 240px;
}
.weather-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-top: 0.15rem;
  line-height: 1.2;
}
.weather-temp {
  font-size: 0.75rem;
  margin-top: 0.1rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .stats-item.weather-widget {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    min-width: 100%;
  }
}

