:root {
  --volt-purple: #8A2BE2;
  --volt-cyan: #00FFFF;
  --volt-blue: #00BFFF;
  --dark-bg: #0a0a1a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: linear-gradient(135deg, var(--dark-bg), #1a1a3a);
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  text-align: center;
  padding: 20px 0;
  background: rgba(10, 10, 26, 0.8);
}
h1 {
  background: linear-gradient(to right, var(--volt-cyan), var(--volt-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2rem;
}
.section {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
.content {
  background: rgba(20, 20, 40, 0.9);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--volt-blue);
  max-width: 500px;
  margin: 0 auto;
}
.role-options {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}
.role-option {
  flex: 1;
  padding: 20px;
  border: 2px solid var(--volt-blue);
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.role-option:hover {
  transform: scale(1.02);
  box-shadow: 0 0 15px var(--volt-cyan);
}
.role-option.selected {
  border-color: var(--volt-purple);
  box-shadow: 0 0 20px var(--volt-purple);
}
.role-option h3 {
  margin-bottom: 10px;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--volt-blue);
  background: rgba(10, 10, 30, 0.7);
  color: white;
}
.btn {
  background: var(--volt-purple);
  color: white;
  border: none;
  padding: 12px 24px;
  margin: 10px 0;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}
.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--volt-cyan);
}

/* Home Page */
#homePage {
  display: none;
  flex: 1;
  flex-direction: column;
}
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(10, 10, 26, 0.8);
}
.home-title {
  font-size: 1.3rem;
  font-weight: bold;
}
.reels-container {
  height: calc(100vh - 140px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}
.reel-item {
  height: 100%;
  position: relative;
  background: black;
  scroll-snap-align: start;
}
.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
}
.reel-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.reel-creator {
  color: var(--volt-cyan);
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
}
.reel-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}
.action-btn {
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Notifications & Messages */
.list-container {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.list-item {
  background: rgba(30, 30, 60, 0.7);
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  border-left: 3px solid var(--volt-purple);
}
.list-item h4 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}
.list-item p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Bottom Nav */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 14px 0;
  background: rgba(10, 10, 26, 0.9);
  border-top: 1px solid var(--volt-blue);
  position: sticky;
  bottom: 0;
  width: 100%;
}
.nav-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
}
.nav-btn.active {
  color: var(--volt-cyan);
}
.nav-btn i {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

/* Back to Home Button */
.back-home-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--volt-purple);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 0 12px var(--volt-cyan);
}

/* Profile Page */
.profile-page {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  position: relative;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(10, 10, 26, 0.8);
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--volt-blue);
}
.profile-info {
  flex: 1;
}
.profile-name {
  font-size: 1.5rem;
  margin-bottom: 5px;
}
.profile-stats {
  display: flex;
  gap: 25px;
  margin-top: 10px;
}
.stat {
  text-align: center;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: bold;
}
.stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}
.profile-actions {
  display: flex;
  gap: 12px;
  margin: 12px 0;
}
.profile-nav {
  display: flex;
  justify-content: space-around;
  padding: 12px 10px;
  background: rgba(10, 10, 26, 0.8);
  border-top: 1px solid var(--volt-blue);
}
.nav-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}
.nav-item.active {
  background: var(--volt-purple);
  border-radius: 20px;
}
.profile-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.trending-feed {
  display: none;
  flex: 1;
  flex-direction: column;
}
.trending-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(10, 10, 26, 0.8);
}
.trending-container {
  height: calc(100vh - 120px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}
.trend-item {
  height: 100%;
  position: relative;
  background: black;
  scroll-snap-align: start;
}
.trend-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trend-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
}
.trend-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.trend-creator {
  color: var(--volt-cyan);
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
}
.support-btn {
  background: var(--volt-purple);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 22px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 10px;
}
.logout-btn {
  background: #ff4757;
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: 22px;
  margin-left: auto;
}

/* Public Profile Page */
#publicProfilePage {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  position: relative;
}
#publicProfileHeader {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(10, 10, 26, 0.8);
}
#publicProfileAvatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--volt-blue);
}
#publicProfileInfo {
  flex: 1;
}
#publicProfileName {
  font-size: 1.5rem;
  margin-bottom: 5px;
}
#publicProfileBio {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 10px;
}
#publicProfileStats {
  display: flex;
  gap: 25px;
  margin-top: 10px;
}
#publicProfileReels {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.public-reel-item {
  background: rgba(20, 20, 40, 0.7);
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 12px;
  border-left: 3px solid var(--volt-purple);
}
.public-reel-title {
  font-size: 1.1rem;
  margin-bottom: 5px;
}
.public-reel-meta {
  font-size: 0.9rem;
  color: var(--volt-cyan);
}

/* Edit Profile Modal */
#editProfileModal {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
#editProfileModal .content {
  max-width: 500px;
  margin: 0 auto;
}

/* Email Sign-In Modal */
#emailSignInModal {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
#emailSignInModal .content {
  max-width: 500px;
  margin: 0 auto;
}

/* Create Account Modal */
#createAccountModal {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
#createAccountModal .content {
  max-width: 500px;
  margin: 0 auto;
}

/* ✅ MOBILE RESPONSIVENESS FIXES */
@media (max-width: 768px) {
  .reels-container,
  .trending-container {
    height: calc(100vh - 160px);
  }

  .bottom-nav {
    padding: 16px 0;
    font-size: 0.85rem;
  }

  .nav-btn {
    padding: 8px 0;
  }

  .nav-btn i {
    font-size: 1.5rem;
  }

  .reel-actions,
  .support-btn,
  .action-btn {
    gap: 12px;
    padding: 10px 16px !important;
    font-size: 1rem !important;
  }

  .reel-creator,
  .trend-creator {
    font-size: 1.1rem;
    padding: 6px 0;
  }

  .back-home-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .profile-stats,
  #publicProfileStats {
    gap: 20px;
  }

  .stat-value,
  .public-stat-value {
    font-size: 1.25rem;
  }

  .list-item,
  .public-reel-item {
    padding: 18px;
  }

  input, textarea, select {
    font-size: 16px !important;
  }
}

body, html {
  overflow-x: hidden;
}