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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:  #0f0f23;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #14142d;
    backdrop-filter: blur(10px);
    border-right: 1px solid #14142d;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.logo {
    padding: 2rem 1rem 3rem;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    padding: 0 1rem;
}

.nav-item {
    margin-bottom: 14px;
}

.nav-link {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.burger-menu {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.overlay {
  display: none;
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0,0,0,0.45);
  z-index: 900;
  transition: opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}
body.no-scroll {
  overflow: hidden;
}

/* Main Content */
.main-content {
    background: linear-gradient(135deg, #1f1f3f 0%, #1a1a2e 50%, #16213e 100%);
    flex: 1;
    margin-left: 220px;
    padding: 2rem;
}

.header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.welcome-text {
    margin-top: 0.5em;
    font-size: 26px;
    font-weight: 500;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.user-profile:hover {
    background-color:rgba(255, 255, 255, 0.268);
    transition: all ease-in 150ms;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}




/* Dashboard Bottom Section */

.total-investment {
    background: #14142d;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}
.chart-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.investment-header {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.investment-amount {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 1rem;
    color:rgba(246, 68, 55, 1);
}

.time-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.time-btn, .buy-sell-btn {
    font-size: 16px;
    padding: 10px 28px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.time-btn:hover, .buy-sell-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.main-chart {
    padding: 0 10px 10px 10px;
    height: 630px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chart-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

/* Sparkles Animation */
.sparkle {
    position: fixed;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: sparkle 3s infinite;
    pointer-events: none;
}

.sparkle:nth-child(1) {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 1s;
}

.sparkle:nth-child(3) {
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

@media (max-width: 768px) {
  /* show burger */
  .header {
    margin: 1rem 0 1.5rem;
    align-items: center;
  }
  .burger-menu {
    display: block;
    /* position it top-right inside header */
    position: absolute;
    font-size: 50px;
    
    right: 1rem;
    z-index: 1100;
  }
  .welcome-text {
    margin-top: 0;
    margin-left: 1rem;
  }
  .user-profile {
    display: none;
  }
  /* main content should fill width */
  .main-content {
    margin-left: 0;
    padding: 1em 0 0 0;
  }
  .total-investment{
    padding: 2rem 0;
  }
  .chart-settings {
    flex-direction: column;
    justify-content: center;
  }
  .investment-amount, .investment-header {
    text-align: center;
  }
  .time-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

  }
  /* place sidebar off-screen to the right by default */
  .sidebar {
    /* override left position */
    left:0;
    width: 260px; /* you can keep 220 if you prefer */
    transform: translateX(100%); /* hidden */
    transition: transform 0.28s cubic-bezier(.2,.9,.2,1);
    z-index: 1000;
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.03);
    /* ensure it covers entire height */
    height: 100vh;
  }

  /* when active (open) — slide in */
  .sidebar.active {
    transform: translateX(0);
  }

  /* show overlay when active */
  .overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  /* smaller main-chart height on mobile (optional) */
  .main-chart {
    height: 200px;
    padding: 0;
    background-color: rgba(0,0,0,0);
  }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-bottom {
        grid-template-columns: 1fr;
    }
    
    .stock-grid {
        grid-template-columns: 1fr;
    }
}
