/* ─────────────────────────────────────────────────────────────
   iRingtones — Responsive Layout & Styling
   Mobile-first design with Tailwind CSS compatibility
   Animations, components, and responsive layout
   ───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES & RESET
   ═══════════════════════════════════════════════════════════════ */
:root {
  --bg:        #0a0a0f;
  --surface:   #13131a;
  --surface2:  #1c1c26;
  --surface3:  #242433;
  --accent:    #5e5ce6;
  --accent2:   #bf5af2;
  --accent3:   #30d158;
  --accent4:   #ff375f;
  --text:      #f5f5f7;
  --muted:     #8e8ea0;
  --border:    rgba(255,255,255,0.07);
  --glass:     rgba(255,255,255,0.04);
  --tab-h:     72px;
  --sidenav-w: 240px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS (single definition, used throughout)
   ═══════════════════════════════════════════════════════════════ */
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

@keyframes pulse-play {
  0%, 100% { box-shadow: 0 4px 16px rgba(191, 90, 242, 0.4); }
  50% { box-shadow: 0 8px 28px rgba(191, 90, 242, 0.7); }
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes animate-wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — CARDS, BUTTONS, INTERACTIVE ELEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Hero Banner */
.hero-banner {
  margin: 0 16px 16px;
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(135deg, #3a3adb 0%, #7c3aed 50%, #bf5af2 100%);
  position: relative;
  box-shadow: 0 12px 40px rgba(94, 92, 230, 0.25);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 1024px) {
  .hero-banner {
    margin: 0 32px 20px;
    padding: 36px;
  }
}

.hero-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(94, 92, 230, 0.35);
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.hero-banner::before {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -20px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

/* Ringtone Card */
.rt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.rt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(94, 92, 230, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.rt-card:hover {
  background: var(--surface2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(94, 92, 230, 0.3);
  transform: translateY(-3px);
}

.rt-card:active {
  transform: scale(0.98);
}

.rt-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Featured Card */
.feat-card {
  flex-shrink: 0;
  width: 160px;
  border-radius: 20px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.feat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.feat-card:active {
  transform: scale(0.96);
}

/* Glass Card */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Waveform */
.rt-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.rt-waveform span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--muted);
  transition: background 0.3s;
}

.rt-waveform.playing span {
  background: var(--accent);
  animation: wave 1s ease-in-out infinite;
}

.rt-waveform.playing span:nth-child(2) { animation-delay: 0.1s; }
.rt-waveform.playing span:nth-child(3) { animation-delay: 0.2s; }
.rt-waveform.playing span:nth-child(4) { animation-delay: 0.3s; }
.rt-waveform.playing span:nth-child(5) { animation-delay: 0.15s; }
.rt-waveform.playing span:nth-child(6) { animation-delay: 0.25s; }

/* Play Button */
.play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(94, 92, 230, 0.4);
  position: relative;
}

.play-btn:hover {
  box-shadow: 0 8px 28px rgba(94, 92, 230, 0.6);
  transform: scale(1.08);
}

.play-btn:active {
  transform: scale(0.92);
}

.play-btn.playing {
  background: var(--accent2);
  box-shadow: 0 4px 16px rgba(191, 90, 242, 0.4);
  animation: pulse-play 1.5s ease-in-out infinite;
}

/* Like Button */
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 4px;
}

.like-btn svg {
  transition: fill 0.2s, stroke 0.2s, transform 0.2s;
}

.like-btn:hover {
  color: var(--accent4);
  transform: scale(1.08);
}

.like-btn.liked {
  color: var(--accent4);
  animation: heart-pop 0.3s ease-out;
}

.like-btn.liked svg {
  fill: var(--accent4);
  stroke: var(--accent4);
  filter: drop-shadow(0 0 4px rgba(255, 55, 95, 0.5));
}

.like-btn:active {
  transform: scale(0.85);
}

/* Audio Progress */
.audio-progress {
  height: 3px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.audio-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 0.3s linear;
  width: 0%;
}

/* Detail modal inline player */
.detail-player {
  background: var(--surface2);
  border-radius: 16px;
  padding: 12px 14px 10px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
}

.detail-player-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-player-meta {
  flex: 1;
  min-width: 0;
}

.detail-player-title {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-player-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.detail-player-download {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.detail-player-download:hover {
  background: rgba(255,255,255,0.08);
}

.detail-player-download:active {
  transform: scale(0.94);
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT — SHELL, NAVIGATION, MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════ */

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  position: relative;
}

/* Side Navigation */
#sidenav {
  width: var(--sidenav-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 16px 24px;
  gap: 4px;
  flex-shrink: 0;
  z-index: 200;
}

@media (max-width: 1023px) {
  #sidenav {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5);
  }
  #sidenav.open {
    transform: translateX(0);
  }

  #drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  #drawer-backdrop.open {
    opacity: 1;
    pointer-events: all;
  }
}

@media (min-width: 1024px) {
  #app {
    flex-direction: row;
  }
  #sidenav {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
  }
  #drawer-backdrop {
    display: none !important;
  }
  #mobile-header {
    display: none !important;
  }
  #bottom-nav {
    display: none !important;
  }
  #hamburger {
    display: none !important;
  }
}

/* Sidenav Brand */
.sidenav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(94, 92, 230, 0.4);
}

.brand-name {
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 30%, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile header brand */
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-brand .brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.mobile-brand .brand-name {
  font-size: 17px;
}

/* Sidenav Items */
.snav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.snav-item svg {
  flex-shrink: 0;
  transition: color 0.2s;
}

.snav-item:hover {
  background: var(--surface2);
  color: var(--text);
  transform: translateX(4px);
}

.snav-item.active {
  background: rgba(94, 92, 230, 0.15);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(94, 92, 230, 0.2);
}

.snav-item.active svg {
  color: var(--accent);
}

.snav-item:active {
  transform: scale(0.98);
}

.snav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.snav-section-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 14px 4px;
}

.snav-upload-btn {
  margin-top: auto;
  padding-top: 16px;
}

.snav-upload-btn button {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(94, 92, 230, 0.35);
}

.snav-upload-btn button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(94, 92, 230, 0.5);
}

.snav-upload-btn button:active {
  transform: scale(0.97);
}

/* Main Content Area */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Mobile Header */
#mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

#hamburger {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  transition: all 0.2s;
}

#hamburger:active {
  background: var(--surface3);
}

/* Views Container */
#views {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.view {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: var(--tab-h);
}

@media (min-width: 1024px) {
  .view {
    padding-bottom: 32px;
  }
}

.view.active {
  display: flex;
  z-index: 10;
}

/* Page Header (Desktop) */
.page-header {
  display: none;
}

@media (min-width: 1024px) {
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 32px 0;
    flex-shrink: 0;
  }
  .page-header h1 {
    font-size: 28px;
    font-weight: 900;
  }
  .page-header p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
  }
}

/* View Header (Mobile) */
.view-header-mobile {
  padding: 18px 20px 10px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .view-header-mobile {
    display: none;
  }
}

/* Bottom Navigation */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-h);
  background: rgba(13, 13, 20, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 10px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}

@media (min-width: 1024px) {
  #bottom-nav {
    display: none;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 16px;
  border-radius: 14px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  flex: 1;
}

.nav-item:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.96);
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(94, 92, 230, 0.5));
}

.nav-icon svg {
  color: var(--muted);
  transition: color 0.2s;
}

.nav-item.active .nav-icon svg {
  color: var(--accent);
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-item.active .nav-label {
  color: var(--accent);
}

.nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  bottom: -2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-item.active .nav-dot {
  opacity: 1;
}

/* Upload FAB Nav Item */
.nav-item.nav-upload-fab {
  margin-top: -16px;
}

.nav-item.nav-upload-fab .nav-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgba(94, 92, 230, 0.5);
  color: white;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.nav-upload-fab .nav-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(94, 92, 230, 0.65);
}

.nav-item.nav-upload-fab .nav-icon svg {
  color: white;
}

.nav-item.nav-upload-fab:active .nav-icon {
  transform: scale(0.93);
}

/* ═══════════════════════════════════════════════════════════════
   CONTENT COMPONENTS — SEARCH, FILTERS, LISTS
   ═══════════════════════════════════════════════════════════════ */

/* App Header */
.app-header {
  padding: 20px 20px 8px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .app-header {
    padding: 20px 32px 8px;
  }
}

/* Ringtone List */
.rt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

@media (min-width: 1024px) {
  .rt-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    padding: 0 32px;
  }
}

/* Search */
.search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px 12px 44px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s;
}

.search-wrap:has(.search-input:focus) .search-icon {
  color: var(--accent);
}

/* Category Chips */
.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip:hover {
  background: var(--surface3);
  border-color: rgba(94, 92, 230, 0.5);
  color: var(--text);
}

.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(94, 92, 230, 0.35);
  transform: scale(1.05);
}

.chip:active {
  transform: scale(0.94);
}

/* Sort Bar */
.sort-bar {
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sort-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.sort-btn.active {
  color: var(--text);
  background: var(--surface3);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Section Heading */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 12px;
  animation: slideIn 0.4s ease forwards;
}

@media (min-width: 1024px) {
  .section-head {
    padding: 0 32px;
    animation-delay: 0.1s;
  }
}

/* Featured Scroll */
.featured-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

@media (min-width: 1024px) {
  .featured-scroll {
    padding: 0 32px 4px;
  }
}

/* Trending Tabs (Trending view) */
.trending-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.trending-tabs button {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.trending-tabs button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(94, 92, 230, 0.6);
  transform: translateY(-1px);
}

@media (max-width: 639px) {
  .trending-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .trending-tabs button {
    flex: 1;
  }
}

/* Home / featured trending cards (reuse rt-card shell) */
.trending-card {
  position: relative;
  overflow: hidden;
}

.trending-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(191, 90, 242, 0.16), transparent 55%);
  pointer-events: none;
}

.trending-card-chip {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

@media (min-width: 1024px) {
  .trending-card {
    padding-inline: 20px;
  }
}

/* Trending Top 3 podium cards */
.trending-podium-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .trending-podium-row {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
}

.trending-podium-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.trending-podium-card:hover {
  background: var(--surface2);
  border-color: rgba(94, 92, 230, 0.35);
}

.trending-podium-rank {
  font-size: 20px;
  line-height: 1;
}

.trending-podium-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.trending-podium-avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}

.trending-podium-text {
  min-width: 0;
}

.trending-podium-title {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-podium-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.trending-podium-stat {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS — INPUTS, UPLOAD ZONE, BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.form-area {
  padding: 0 16px;
}

@media (min-width: 1024px) {
  .form-area {
    padding: 0 32px;
    max-width: 640px;
  }
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: block;
}

.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

.form-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  outline: none;
  margin-bottom: 16px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-select:focus {
  border-color: var(--accent);
  background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(94, 92, 230, 0.1);
}

.form-select option {
  background: var(--surface2);
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(94, 92, 230, 0.08);
  transform: scale(1.01);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(94, 92, 230, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(94, 92, 230, 0.5);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE — HEADER, SETTINGS, STATS
   ═══════════════════════════════════════════════════════════════ */

.profile-header {
  background: linear-gradient(180deg, #1a1a2e 0%, var(--bg) 100%);
  padding: 36px 20px 28px;
  text-align: center;
}

@media (min-width: 1024px) {
  .profile-header {
    padding: 40px 32px 28px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 24px;
  }
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 8px 28px rgba(94, 92, 230, 0.4);
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .profile-avatar {
    margin: 0;
  }
}


@media (min-width: 1024px) {
  .profile-body {
    text-align: left;
  }
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.settings-row:hover {
  background: var(--surface2);
  transform: translateX(2px);
}

.settings-row:active {
  background: var(--surface3);
  transform: scale(0.99);
}

.settings-row:last-child {
  border-bottom: none;
}

.profile-content {
  padding: 0 16px;
}

@media (min-width: 1024px) {
  .profile-content {
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
}

/* Icon Box */
.icon-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FAQ & FEATURES
   ═══════════════════════════════════════════════════════════════ */

/* FAQ Accordion */
.faq-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item:hover {
  border-color: rgba(94, 92, 230, 0.3);
  background: var(--surface3);
}

.faq-trigger {
  width: 100%;
  padding: 16px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  transition: color 0.2s;
}

.faq-trigger:hover {
  color: var(--accent);
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0 16px;
}

.faq-item.open .faq-content {
  max-height: 500px;
  padding: 0 16px 16px;
}

.faq-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   MODALS, TOASTS & MISC
   ═══════════════════════════════════════════════════════════════ */

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 1024px) {
  .toast {
    bottom: 24px;
    left: calc(var(--sidenav-w) + 24px);
    transform: translateY(20px);
  }
  .toast.show {
    transform: translateY(0);
  }
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

@media (min-width: 1024px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  padding: 20px;
  width: 100%;
  max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  max-height: 85dvh;
  overflow-y: auto;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
  .modal-sheet {
    border-radius: 24px;
    transform: translateY(20px) scale(0.97);
    max-height: 80dvh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }
  .modal-overlay.open .modal-sheet {
    transform: translateY(0) scale(1);
  }
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  margin: 0 auto 20px;
}

@media (min-width: 1024px) {
  .modal-handle {
    display: none;
  }
}

/* Spinner */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 0%, var(--surface3) 50%, var(--surface2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--muted);
  text-align: center;
  animation: fadeUp 0.5s ease;
}

/* Utility Classes */
.fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
