/* ============================================
   Modern UI Upgrade - GPTrader V2
   Overrides + enhancements for a premium feel
   ============================================ */

/* ---- Smoother Global Feel ---- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #060a12;
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(0, 255, 0, 0.015) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 100, 255, 0.01) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ---- Page Fade-in Transition ---- */
.main-content {
  animation: pageSlideIn 0.4s ease-out;
}

@keyframes pageSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Improved Cards ---- */
.card, .stat-card, .feature-card, .info-card,
[class*="card"] {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.25s ease,
              border-color 0.25s ease;
}

/* ---- Better Glass Effect ---- */
.glass-navbar,
.glass-card,
.sidebar {
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* ---- Sidebar Upgrades ---- */
.sidebar {
  background: rgba(8, 12, 22, 0.92);
  border-right: 1px solid rgba(0, 255, 0, 0.06);
}

.sidebar .nav-item {
  border-radius: 10px;
  margin: 2px 8px;
  padding: 10px 12px;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar .nav-item:hover {
  background: rgba(0, 255, 0, 0.06);
}

.sidebar .nav-item.active {
  background: rgba(0, 255, 0, 0.1);
  border-left: 3px solid #00ff00;
}

.sidebar .nav-item.active i {
  color: #00ff00 !important;
  filter: drop-shadow(0 0 6px rgba(0, 255, 0, 0.4));
}

.sidebar .nav-item.active .nav-text {
  color: #00ff00 !important;
}

/* ---- Better Buttons ---- */
button, .btn, [class*="btn-"] {
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active, .btn:active {
  transform: scale(0.97);
}

/* ---- Improved Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 0, 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 0, 0.25);
}

/* ---- Hub Cards Upgrade ---- */
.hub-grid .hub-card,
.feature-card-modern {
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-grid .hub-card:hover,
.feature-card-modern:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 0, 0.15);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 0, 0.05);
}

/* ---- Header/Navbar Polish ---- */
.glass-navbar {
  border-bottom: 1px solid rgba(0, 255, 0, 0.06);
  background: rgba(8, 12, 22, 0.85);
}

.neon-logo-img {
  filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.3));
}

/* ---- Input Fields Upgrade ---- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea,
select {
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.1);
}

/* ---- Login Page Enhancements ---- */
.login-container {
  min-height: 100vh;
}

.login-card {
  border: 1px solid rgba(0, 255, 0, 0.08);
  box-shadow: 
    0 16px 64px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 255, 0, 0.04);
  animation: loginCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.register-card {
  border: 1px solid rgba(0, 255, 0, 0.08);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
  animation: loginCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.login-card .btn-login,
.login-card button[type="submit"],
.register-card button[type="submit"] {
  position: relative;
  overflow: hidden;
}

.login-card .btn-login::after,
.login-card button[type="submit"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.login-card .btn-login:hover::after,
.login-card button[type="submit"]:hover::after {
  transform: translateX(100%);
}

/* ---- Stats/KPI Cards ---- */
.stat-card, .kpi-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(16, 24, 38, 0.7);
  backdrop-filter: blur(12px);
}

/* ---- Loading Spinner Upgrade ---- */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 255, 0, 0.1);
  border-top-color: #00ff00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Forum/Topic Cards ---- */
.topic-card, .forum-card {
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.topic-card:hover, .forum-card:hover {
  border-color: rgba(0, 255, 0, 0.12);
  transform: translateY(-2px);
}

/* ---- Notification/Toast Upgrade ---- */
.notification, .toast, .alert {
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

/* ---- Mobile Improvements ---- */
@media (max-width: 768px) {
  .glass-navbar {
    padding: 8px 12px;
  }
  
  .brand-titles h2 {
    font-size: 1.1rem;
  }
  
  .brand-subtitle {
    display: none;
  }
  
  .nav-actions .icon-btn {
    width: 36px;
    height: 36px;
  }
  
  .tech-badges-container {
    display: none;
  }
  
  /* Better mobile cards */
  .hub-grid {
    gap: 12px;
  }
  
  .hub-grid .hub-card {
    border-radius: 12px;
  }
  
  /* Full-width forms on mobile */
  .login-container-wrapper {
    flex-direction: column;
    gap: 16px;
    padding: 0 12px;
  }
  
  .login-card, .register-card {
    max-width: 100%;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding-top: 60px;
  }
  
  .dashboard-content-spacer {
    height: 10px;
  }
  
  body {
    font-size: 14px;
  }
}

/* ---- Smooth Link Transitions ---- */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ---- Selection Color ---- */
::selection {
  background: rgba(0, 255, 0, 0.2);
  color: #ffffff;
}

/* ---- Focus Visible (Accessibility) ---- */
:focus-visible {
  outline: 2px solid rgba(0, 255, 0, 0.4);
  outline-offset: 2px;
}

/* ---- Skeleton Loading Animation ---- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
