/* 
  SpiritReward - Master UI/UX Architecture
  Restored Full Styling
*/

:root {
  --sb-width: 260px;
  --header-height: 70px;
  --ticker-height: 40px;
  
  --bg-deep: #0a0b0d;
  --bg-side: #0f1014;
  --bg-card: #161920;
  --primary: #00e074;
  --primary-glow: rgba(0, 224, 116, 0.4);
  --border: rgba(255, 255, 255, 0.06);
  --text-main: #ffffff;
  --text-muted: #848b9c;
}

* { box-sizing: border-box; }
body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  margin: 0; padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- App Shell Architecture --- */

.sidebar {
  width: var(--sb-width);
  height: 100vh;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav-wrapper {
  position: fixed;
  top: 0; left: var(--sb-width); right: 0;
  z-index: 900;
  background: transparent;
}

.nav-header {
  height: var(--header-height);
  background: rgba(15, 16, 20, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.ticker-bar {
  height: var(--ticker-height);
  background: #0d0e12;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.main-viewport {
  margin-left: var(--sb-width);
  padding-top: calc(var(--header-height) + var(--ticker-height));
  min-height: 100vh;
}

footer {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Desktop Sidebar Toggle (Closed State) --- */
@media (min-width: 1025px) {
  footer {
    margin-left: var(--sb-width);
  }
  body.sidebar-closed .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-closed .main-viewport,
  body.sidebar-closed footer {
    margin-left: 0;
  }
  body.sidebar-closed .top-nav-wrapper {
    left: 0;
  }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); z-index: 2000; }
  .sidebar.open { transform: translateX(0) !important; }
  .top-nav-wrapper { left: 0; }
  .main-viewport { margin-left: 0; }
  footer { margin-left: 0; }
}

/* --- Sidebar Navigation --- */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  margin: 4px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.03); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 224, 116, 0.1) 0%, transparent 100%);
  color: var(--primary);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  background: var(--primary); border-radius: 0 4px 4px 0;
  box-shadow: 4px 0 10px var(--primary-glow);
}
.nav-item i { 
  width: 20px; 
  text-align: center; 
  font-size: 18px; 
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.nav-item:hover i {
  transform: rotate(360deg) scale(1.2);
  color: var(--primary);
}

/* --- Ticker Animation --- */
.marquee-content { display: flex; gap: 60px; animation: scroll 45s linear infinite; white-space: nowrap; align-items: center; }
.marquee-item { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Components --- */
.card-premium {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 3px solid var(--primary);
}
.card-premium:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5);
}

/* --- Restored Clean Buttons --- */

.btn-auth-signup {
  background: linear-gradient(135deg, #00ff84 0%, #00e074 100%);
  color: #000 !important;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 10px 24px;
  border-radius: 12px; /* Smooth rounded corners */
  box-shadow: 0 0 20px var(--primary-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px; /* Spacing */
}

.btn-auth-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-auth-login {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 24px;
  border-radius: 12px; /* Smooth rounded corners */
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-auth-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* --- Scrollbars --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
