:root {
  --gray: #f2f2f5;
  --text: #333333;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background-color: #fff5f6;
}

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

.logo-header {
  position: fixed;
  top: 25px;
  left: 25px;
  max-width: 155px;
  z-index: 1000;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.main-content {
  width: 100%;
  padding: 0 20px;
  margin-top: 120px;
}

.main-image {
  max-width: 100%;
  height: auto;
  /* Optimize for performance */
  will-change: transform;
  transform: translateZ(0);
}

.auth-links {
  position: absolute;
  top: 25px;
  right: 25px;
  display: flex;
  gap: 10px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background-color: #f8748f;
  color: white;
  border: none;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #e24d7d;
}

.btn-secondary {
  background-color: transparent;
  color: #f8748f;
  border: 2px solid #f8748f;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover {
  background-color: #ffe4e9;
}

/* Danger button for destructive actions */
.btn-danger {
  background-color: #de4d4d;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-danger:hover {
  background-color: #c73737;
}

.btn-pink-gradient {
  background: linear-gradient(135deg, #f8748f 0%, #ffb2c2 100%);
  color: white;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-pink-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(248, 116, 143, 0.4);
}

.nav-links {
  position: absolute;
  top: 25px;
  right: 25px;
  display: flex;
  gap: 10px;
}

/* mobile browser nav */
.hamburger {
  display: none;
  position: absolute;
  top: 25px;
  right: 25px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #e24d7d;
  cursor: pointer;
  z-index: 1001;
}

/* Hide mobile-only elements on larger screens */
@media (min-width: 601px) {
  .mobile-only {
    display: none !important;
  }
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-btn-primary {
  background-color: #f8748f;
  color: #fff;
  border: none;
}

.nav-btn-primary:hover {
  background-color: #e24d7d;
}

.nav-btn-secondary {
  background-color: transparent;
  color: #f8748f;
  border: 2px solid #f8748f;
}

.nav-btn-secondary:hover {
  background-color: #ffe4e9;
}

/* Persistent bottom navigation for mobile */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.bottom-nav .nav-btn {
  flex: 1;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Sora", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: var(--text);
  text-align: center;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(180deg, #fafafa 0%, #fff5f6 100%);
}

h1 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.landing-h1 {
  margin-top: auto;
  font-size: 60px;
  margin-left: auto;
  margin-right: auto;
}

.home-title {
  margin-top: auto;
}

p {
  color: #666;
  margin-bottom: 30px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.glow {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(248, 116, 143, 0.7) 10%,
    rgba(255, 245, 246, 0.1) 70%
  );
  filter: blur(120px);
  z-index: 0;
}

.email-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  margin-bottom: 100px;
}

#notify-wrapper {
  position: relative;
  display: inline-block;
}

.spinner {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  margin-left: -12px;
  border: 3px solid rgba(248, 116, 143, 0.6);
  border-top-color: #f8748f;
  border-right-color: #f8748f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  pointer-events: none;
}

#notify-wrapper button {
  transition: opacity 0.3s ease;
}

#notify-wrapper.loading button {
  opacity: 0;
}

#notify-wrapper.loading .spinner {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.fade-page {
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.fade-page.loaded {
  opacity: 1;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 245, 246, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 9999;
}

.loading-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.loading-overlay .spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.loading-overlay .loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-overlay .loading-logo {
  width: 200px;
  margin-bottom: 20px;
}

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

.input-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin: 15px;
}

input[type="email"],
input[type="password"],
input[type="number"] {
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 250px;
  height: 43px;
}

button {
  height: 43px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background-color: #f8748f;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #e24d7d;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  width: 250px;
  margin: 8px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ccc;
}

.divider span {
  padding: 0 10px;
  color: #666;
  font-size: 0.9rem;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: #333;
  border: 1px solid #ccc;
  width: 250px;
}

.google-btn:hover {
  background-color: #f5f5f5;
  border-color: #999;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 8px;
}

.icon-btn:hover {
  color: #e24d7d;
}

.edit-recurring {
  color: #000;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-bottom {
  height: fit-content;
  width: 100%;
  background-color: #f5c8d1;
  padding: 40px 20px;
}

.about-blurb {
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
}

.about-blurb a {
  color: #e24d7d;
  text-decoration: none;
}

.about-blurb a:hover {
  text-decoration: underline;
}

footer {
  position: absolute;
  bottom: 20px;
  font-size: 0.85rem;
  color: #838383;
}

.info-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  margin: 80px 0;
  max-width: 900px;
  width: 100%;
}

.info-section.vertical-info {
  flex-direction: column;
  text-align: center;
}

.vertical-info .text-column {
  text-align: center;
}

.image-column,
.text-column {
  flex: 1;
}

.image-column {
  display: flex;
  justify-content: center;
}

.section-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  /* Optimize for performance */
  will-change: transform;
  transform: translateZ(0);
  /* Smooth loading */
  transition: opacity 0.3s ease;
}

.about-image {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.text-column {
  text-align: left;
}

.about-content {
  margin-top: 140px;
}

@media (max-width: 600px) {
  body {
    font-size: 1.1rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h1,
  .landing-h1 {
    font-size: 2.2rem;
    padding: 20px;
  }

  p {
    font-size: 1rem;
    margin-left: 20px;
    margin-right: 20px;
    max-width: 390px;
  }

  .logo-header {
    position: static;
    max-width: 125px;
    padding-bottom: 0;
  }

  .glow {
    width: 300px;
    height: 350px;
    filter: blur(100px);
  }

  input[type="email"],
  input[type="password"],
  input[type="number"] {
    width: 100%;
    font-size: 1.1rem;
    height: 50px;
  }

  button {
    font-size: 1.1rem;
    height: 50px;
  }

  .email-box {
    gap: 12px;
    padding: 10px;
  }

  .input-container {
    width: 90%;
    margin: 10px;
  }

  footer {
    margin-top: 30px;
    font-size: 0.8rem;
  }

  .info-section {
    flex-direction: column;
    gap: 40px;
    margin: 60px 0;
  }

  .section-image {
    max-width: 90%;
  }

  .about-image {
    max-width: 390px;
    margin-left: auto;
    margin-right: auto;
  }

  .text-column {
    text-align: center;
    padding: 10px 0;
  }

  .hero-bottom {
    padding: 30px 20px;
  }

  .main-image {
    max-width: 90%;
  }

  .about-content {
    margin-top: 100px;
  }

  /* Mobile browser nav */
  header {
    background: #fff5f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 70px;
  }

  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #e24d7d;
    transform: translateY(-2px);
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 15px;
    background: #fff5f6;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  .nav-links.open {
    display: flex;
  }
}

.portfolio-options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.portfolio-card {
  background-color: white;
  border: 1px solid #f5c8d1;
  border-radius: 12px;
  padding: 20px;
  max-width: 260px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portfolio-card h3 {
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.portfolio-card .performance {
  color: #3cb371;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .portfolio-card {
    max-width: 90%;
  }
}

.dashboard-main {
  width: 100%;
  max-width: 1200px;
  margin-top: 120px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.dashboard-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  justify-content: center;
}

.settings-main {
  width: 100%;
  max-width: 600px;
  margin-top: 120px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.settings-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  border: 2px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.settings-card p {
  margin: 0;
}

/* Connected bank account styles */
.bank-card {
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 15px;
  border: 2px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.bank-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.account-list {
  list-style: none;
  width: 100%;
}

.account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray);
}

.account-item:last-child {
  border-bottom: none;
}

.account-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.account-name {
  font-weight: 600;
}

.account-last4 {
  font-size: 0.9rem;
  color: #666;
}

.account-balance {
  font-weight: 600;
  margin-right: 10px;
}

.investment-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  flex: 1 1 250px;
  border: 2px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

.portfolio-summary {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  flex: 1 1 250px;
  border: 2px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

.recurring-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  flex: 1 1 250px;
  border: 2px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  position: relative;
  min-height: 220px;
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

.recurring-card p {
  margin: 0;
}

#edit-recurring-btn {
  margin-top: auto;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #555;
}

.recurring-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #1c1c1e;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.recurring-frequency {
  font-size: 1rem;
  color: #555;
}

.portfolio-summary p {
  margin: 0;
  font-size: 1.1rem;
}

.portfolio-summary .card-title {
  font-size: 1.4rem;
}

.investment-card .amount {
  font-size: 3rem;
  font-weight: 700;
  margin: 8px 0;
  color: #1c1c1e;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

.investment-card .change {
  font-size: 1rem;
  font-weight: 500;
}

.change.positive {
  color: #3cb371;
}

.change.negative {
  color: #de4d4d;
}

.settings-icon {
  position: fixed;
  top: 25px;
  right: 25px;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.settings-icon:hover {
  color: #e24d7d;
}

.portfolio-who {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.who-item {
  background-color: white;
  border: 1px solid #f5c8d1;
  border-radius: 12px;
  padding: 20px;
  max-width: 260px;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.who-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.who-item p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .who-item {
    max-width: 90%;
  }
}

.notify-content {
  margin-top: 100px;
  margin-bottom: 60px;
}

.notify-image {
  height: 300px;
  display: block;
  margin: 40px auto;
}

.notify-footer {
  position: relative;
  margin-top: 40px;
}

.contact-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

.contact-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-width: 340px;
  width: 100%;
  text-align: center;
  border: 2px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

.contact-label {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.notfound-content {
  margin-top: 100px;
  margin-bottom: 60px;
}

.notfound-image {
  height: 300px;
  display: block;
  margin: 40px auto;
}

/* Recurring investment modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  text-align: left;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #1c1c1e;
}

.frequency-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.amount-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.amount-input-row label {
  font-weight: 600;
}

.save-status {
  color: #3cb371;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* Dashboard nav */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #f8748f, #ffb2c2) border-box;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  z-index: 1500;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: block;
  margin-bottom: 40px;
}
.sidebar-logo img {
  max-width: 155px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.sidebar-menu a:hover {
  background-color: #ffe4e9;
}
.home-icon {
  font-size: 1.6rem;
}
.sidebar-menu .nav-icon,
.sidebar-footer .nav-icon {
  font-size: 1.4rem;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;

  transition: background-color 0.2s ease;
}

.sidebar-footer a:hover {
  background-color: #ffe4e9;
}

.logout-link:hover {
  background-color: #f8a3b3;
}

/* Sidebar collapse toggle buttons */
.sidebar-open-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  background-color: #f8748f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.5rem;
  z-index: 1600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sidebar-open-btn:hover {
  background-color: #e24d7d;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #e24d7d;
  align-self: flex-end;
  cursor: pointer;
  margin-bottom: 20px;
}

body.with-sidebar {
  margin-left: 220px;
}

.chart-container {
  width: 100%;
  margin-top: 10px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time-range-selector {
  position: relative;
}

.time-range-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  color: #555;
}

.time-range-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10;
}

.time-range-menu li {
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.time-range-menu li:hover {
  background: #f5f5f5;
}

@media (max-width: 600px) {
  .sidebar,
  .sidebar-open-btn,
  .sidebar-close-btn {
    display: none;
  }
  body.with-sidebar {
    margin-left: 0;
  }
}

/* Deposit page styles */
.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.info-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.info-box h3 {
  margin-bottom: 10px;
  color: #333;
  font-size: 1.1rem;
}

.amount-input {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 12px;
  color: #666;
  font-weight: 500;
  z-index: 1;
}

.amount-input input {
  padding-left: 30px;
}

.quick-amounts {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.quick-amounts p {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.9rem;
}

.amount-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.amount-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  min-width: 60px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #f8748f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.transfer-details {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.transfer-details p {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.transfer-details p:last-child {
  margin-bottom: 0;
}

.error-card {
  border: 1px solid #dc3545;
  background: #f8d7da;
}

.error-card h2 {
  color: #721c24;
}

.error-card p {
  color: #721c24;
}

/* Form styles for deposit page */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #f8748f;
  box-shadow: 0 0 0 2px rgba(248, 116, 143, 0.2);
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 0.85rem;
}

/* Card styles for deposit page */
.card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.card h2 {
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

.card p {
  margin-bottom: 20px;
  color: #666;
  text-align: center;
}

/* Responsive adjustments for deposit page */
@media (max-width: 600px) {
  .card {
    padding: 20px;
    margin: 10px;
  }

  .amount-buttons {
    justify-content: center;
  }

  .amount-btn {
    flex: 1;
    min-width: 50px;
  }

  .transfer-details p {
    flex-direction: column;
    gap: 5px;
  }
}

/* Investment Portfolio Styles */
.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.stat-value.positive {
  color: #28a745;
}

.stat-value.negative {
  color: #dc3545;
}

.investment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.option-card {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.option-card:hover {
  border-color: #f8748f;
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: #f8748f;
  background: #ffe4e9;
}

.option-card h3 {
  margin-bottom: 10px;
  color: #333;
}

.option-description {
  color: #666;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.option-allocation {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #555;
}

.option-allocation span {
  background: white;
  padding: 5px 10px;
  border-radius: 15px;
  border: 1px solid #ddd;
}

.holding-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 10px;
  background: white;
}

.holding-info h4 {
  margin: 0 0 5px 0;
  color: #333;
}

.holding-info p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.holding-value {
  text-align: right;
}

.holding-value .value {
  display: block;
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.holding-value .return {
  font-size: 0.85rem;
}

.holding-value .return.positive {
  color: #28a745;
}

.holding-value .return.negative {
  color: #dc3545;
}

.no-holdings {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px 20px;
}

/* Form select styles */
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.form-group select:focus {
  outline: none;
  border-color: #f8748f;
  box-shadow: 0 0 0 2px rgba(248, 116, 143, 0.2);
}

/* Responsive adjustments for portfolio */
@media (max-width: 600px) {
  .portfolio-stats {
    grid-template-columns: 1fr;
  }

  .investment-options {
    grid-template-columns: 1fr;
  }

  .holding-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .holding-value {
    text-align: center;
  }
}

/* Terms of Service page styles */
.terms-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: left;
}

.terms-container h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
  color: #333;
}

.effective-date {
  text-align: center;
  color: #666;
  font-size: 1rem;
  margin-bottom: 40px;
  font-style: italic;
}

.terms-content {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border: 2px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

.terms-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #333;
}

.terms-content h2:first-child {
  margin-top: 0;
}

.terms-content p {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #555;
  text-align: left;
}

.terms-content a {
  color: #f8748f;
  text-decoration: none;
}

.terms-content a:hover {
  text-decoration: underline;
}

/* Responsive adjustments for terms page */
@media (max-width: 600px) {
  .terms-container {
    padding: 0 15px;
  }

  .terms-container h1 {
    font-size: 2rem;
  }

  .terms-content {
    padding: 25px;
  }

  .terms-content h2 {
    font-size: 1.2rem;
  }
}

/* Pricing Page Styles */
.pricing-main {
  margin-top: 120px;
  padding: 40px 20px 120px 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

.pricing-section {
  width: 100%;
}

.pricing-title {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
  color: #333;
}

.pricing-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.2rem;
  margin-bottom: 40px;
}

/* Billing Toggle */
.billing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.billing-label {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 30px;
}

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

.toggle-switch input:checked + .toggle-slider {
  background-color: #f8748f;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

.billing-savings {
  background: linear-gradient(135deg, #f8748f 0%, #ffb2c2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Pricing Cards */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 30px;
  border: 2px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background-image: linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #f8748f, #ffb2c2);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.pricing-card-featured {
  border-width: 3px;
  transform: scale(1.05);
}

.pricing-card-featured:hover {
  transform: scale(1.05) translateY(-5px);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f8748f 0%, #ffb2c2 100%);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(248, 116, 143, 0.4);
}

.plan-header {
  text-align: center;
  margin-bottom: 30px;
}

.plan-name {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}

.price-amount {
  font-size: 3rem;
  font-weight: 700;
  color: #1c1c1e;
}

.price-period {
  font-size: 1.2rem;
  color: #666;
}

.price-note {
  font-size: 0.9rem;
  color: #666;
  margin-top: 10px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  flex-grow: 1;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  color: #f8748f;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-item span:not(.feature-icon) {
  color: #555;
  line-height: 1.5;
}

.coming-soon {
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
}

.plan-button {
  width: 100%;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  margin-top: auto;
}

.plan-button-primary {
  background: linear-gradient(135deg, #f8748f 0%, #ffb2c2 100%);
  color: white;
}

.plan-button-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(248, 116, 143, 0.4);
}

.plan-button-secondary {
  background: #f5f5f5;
  color: #666;
  border: 2px solid #e0e0e0;
}

.plan-button-secondary:hover:not(:disabled) {
  background: #e8e8e8;
}

.plan-button-danger {
  background: #fff;
  color: #de4d4d;
  border: 2px solid #de4d4d;
}

.plan-button-danger:hover:not(:disabled) {
  background: #ffe4e9;
}

.plan-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pricing-error {
  max-width: 600px;
  margin: 20px auto;
  padding: 15px 20px;
  border-radius: 8px;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  text-align: center;
}

.pricing-error.error {
  background: #f8d7da;
  color: #721c24;
}

.pricing-error.success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

/* Responsive Pricing Styles */
@media (max-width: 600px) {
  .pricing-main {
    padding-bottom: 100px;
    margin-bottom: 20px;
  }

  .pricing-title {
    font-size: 2rem;
  }

  .pricing-subtitle {
    font-size: 1rem;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pricing-card {
    padding: 30px 20px;
  }

  .pricing-card-featured {
    transform: scale(1);
  }

  .billing-toggle-container {
    gap: 10px;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .plan-name {
    font-size: 1.5rem;
  }
}
