:root {
  --primary: #8B5CF6;
  --primary-hover: #7c3aed;
  --blue: #0EA5E9;
  --bg: #030014;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --card-bg: rgba(20, 20, 35, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.08), transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
      radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0)),
      radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.3;
  animation: twinkle 10s infinite linear;
}

@keyframes twinkle {
  0% { transform: translateY(0); }
  100% { transform: translateY(-200px); }
}

header {
  width: 100%;
  padding: 15px 0;
  background: rgba(3, 0, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.header-inner {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 30px;
  background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; 
}

.logo-text {
  display: inline-flex;
  align-items: center;
}

.mlogo {
    position: relative;
    top: 2px;
    font-size: 20px;
    color: #ff0000 !important;
    background: none !important;
    -webkit-text-fill-color: #ff0000 !important;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0;
    font-weight: normal;
    font-variation-settings: 'FILL' 1, 'wght' 400;
    animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
  from {
    opacity: 1;
    text-shadow: 0 0 0 rgba(255, 0, 0, 0);
  }
  to {
    opacity: 0.5;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.9);
  }
}

.logo:hover {
  opacity: 0.9;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 20px;
  border-radius: 40px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.main-nav a span {
  font-size: 20px;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-btn {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: 0.3s;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.signup-btn {
  background: #fff;
  color: #000;
  padding: 8px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
    display: none;
    font-size: 20px;
}

.login-btn:hover {
  opacity: 1;
  color: var(--primary);
}

.signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.user-menu {
  position: relative;
  z-index: 1001;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px 4px 4px;
  border-radius: 50px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 200px;
}

.user-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.username {
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow-icon {
  font-size: 18px;
  color: #94a3b8;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 2000;
}

.user-menu.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 5px;
}

.dropdown-name {
  display: block;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-role {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 4px 0;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: 0.2s;
}

.user-dropdown a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.user-dropdown .logout-link {
  color: #ef4444;
}

.user-dropdown .logout-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fff;
}

.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.85rem;
  transition: 0.3s;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lang-flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  width: 140px;
  display: none;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 5px;
}

.lang-dropdown.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  transition: 0.2s;
  border-radius: 6px;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.lang-item img {
  width: 18px;
  height: 13px;
  border-radius: 2px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.credit-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  z-index: 10;
}

.credit-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.credit-count {
  font-weight: 700;
  color: #fbbf24;
  font-family: monospace;
  font-size: 1.1em;
}

.use-count {
    font-weight: 700;
    color: #d4d4d4;
    font-family: monospace;
    font-size: 20px;
    margin-left: 5px;
}

.dashboard-credit {
    display: flex;
    font-size: 20px;

}
.bolt-icon {
  font-size: 18px;
  color: #fbbf24;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

main {
  flex: 1;
  text-align: center;
  padding: 120px 20px 40px; 
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 40%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 20px 50px rgba(139, 92, 246, 0.3);
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.xlogo {
  height: 0.85em;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-title:hover .xlogo {
  transform: scale(1.1) rotate(-5deg);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 3.2rem;
    gap: 10px;
    flex-wrap: wrap;
    letter-spacing: -1.5px;
  }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-bottom: 50px;
  max-width: 600px;
  line-height: 1.6;
}

.card {
  width: 100%;
  max-width: 800px;
  background: var(--card-bg);
  backdrop-filter: blur(40px);
  border-radius: 24px;
  padding: 50px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.input-wrapper {
  position: relative;
  margin-bottom: 25px;
  margin-top: 47px;
}

.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.icon-link { left: 20px; }
.icon-status { right: 20px; color: var(--blue); }

input {
  width: 100%;
  padding: 20px 50px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

input:focus ~ .icon-link { color: var(--primary); }

.btn-download {
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border: none;
  border-radius: 16px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(29, 155, 240, 0.4);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin-top: 60px;
}

.feat-item {
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-align: center;
  transition: 0.3s;
}

.feat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.feat-icon {
  font-size: 36px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.feat-item h3 { font-size: 1.1rem; margin-bottom: 8px; color: #fff; }
.feat-item p { font-size: 0.9rem; color: #94a3b8; }

footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.4);
  color: #64748b;
  font-size: 0.9rem;
  margin-top: auto;
}

.auth-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 120px 20px 40px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #18181b;
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-title { margin-bottom: 1.5rem; color: #fff; font-size: 1.75rem; font-weight: 700; text-align: center; }

.auth-alert {
    background: rgba(239, 68, 68, 0.1); color: #ef4444; padding: 1rem; border-radius: 0.75rem;
    margin-bottom: 1.5rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem;
}

.auth-input-wrapper { position: relative; margin-bottom: 1.25rem; }

.auth-input-icon {
    position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 1.25rem; pointer-events: none;
}

.auth-input {
    width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1rem 1rem 3.5rem; border-radius: 0.75rem; color: #fff;
    font-size: 0.95rem; font-family: 'Inter', sans-serif;
}

.auth-input:focus { border-color: #3b82f6; background: rgba(0, 0, 0, 0.2); }

.auth-btn-primary {
    width: 100%; background: #3b82f6; color: #fff; border: none; padding: 1rem;
    border-radius: 0.75rem; font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; margin-top: 0.5rem;
}

.auth-btn-primary:hover { background: #2563eb; transform: translateY(-2px); }

.auth-divider { margin: 1.5rem 0; text-align: center; position: relative; }
.auth-divider span { background: #18181b; padding: 0 1rem; color: #64748b; font-size: 0.9rem; position: relative; z-index: 1; }
.auth-divider::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: rgba(255, 255, 255, 0.1); z-index: 0; }

.auth-btn-twitter {
    width: 100%; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.85rem; border-radius: 0.75rem; font-size: 0.95rem; font-weight: 500;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 0.75rem; text-decoration: none; transition: 0.2s;
}

.auth-btn-twitter:hover { background: #111; border-color: rgba(255, 255, 255, 0.3); }

.auth-footer { margin-top: 1.5rem; text-align: center; color: #94a3b8; font-size: 0.9rem; }
.auth-link { color: #3b82f6; text-decoration: none; font-weight: 500; margin-left: 0.25rem; }
.auth-link:hover { text-decoration: underline; }

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

.mobile-menu-btn span { font-size: 28px; }

.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 0, 20, 0.95); backdrop-filter: blur(20px);
    z-index: 2000; display: none;
}

.mobile-menu-overlay.active { display: flex; }

.mobile-menu-content {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    padding: 80px 20px 20px; position: relative;
}

.close-menu {
    position: absolute; top: 20px; right: 20px; background: transparent;
    border: none; color: #fff; cursor: pointer;
}

.close-menu span { font-size: 32px; }

.mobile-nav {
    display: flex; flex-direction: column; gap: 15px; width: 100%;
}

.mobile-nav a {
    display: flex; align-items: center; gap: 12px; padding: 15px;
    background: rgba(255, 255, 255, 0.05); border-radius: 12px;
    color: #fff; text-decoration: none; font-size: 1.1rem; font-weight: 600;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 1200px;
}

.track-card {
    background: #16181c;
    border: 1px solid #2f3336;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
    min-width: 0;
}

.track-card:hover { transform: translateY(-2px); border-color: #1d9bf0; }

.user-info { display: flex; align-items: center; gap: 12px; overflow: hidden; }

.user-avatar-track {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 2px solid #2f3336; flex-shrink: 0;
}

.user-details { overflow: hidden; min-width: 0; }

.user-details h4 {
    color: #fff; margin: 0 0 4px 0; font-size: 0.95rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.status-text { font-size: 0.8rem; font-weight: 500; }
.status-active { color: #22c55e; }
.status-passive { color: #64748b; }

.controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2f3336; transition: .4s; border-radius: 24px;
}

.slider:before {
    position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}

input:checked + .slider { background-color: #1d9bf0; }
input:checked + .slider:before { transform: translateX(18px); }

.delete-btn {
    background: rgba(239, 68, 68, 0.1); border: none; color: #ef4444;
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}

.delete-btn:hover { background: #ef4444; color: white; }

@media (max-width: 768px) {
    .header-center { display: none; }
    .mobile-menu-btn { display: block; }
    .btn-text { display: none; }
    .btn-icon { display: block; }
    .signup-btn, .login-btn { padding: 8px; border-radius: 50%; width: 36px; height: 36px; justify-content: center; }
    .lang-text { display: none; }
    .hero-title { font-size: 2.5rem; }
    .track-grid { grid-template-columns: 1fr; }
    .user-menu { margin-right: 0; }
    .user-menu-toggle { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
    .user-menu-toggle .username, .user-menu-toggle .arrow-icon { display: none; }
}

@media (max-width: 480px) {
    .card { padding: 30px 20px; }
    .track-grid { grid-template-columns: 1fr; }
}