﻿body {
  font-family: Arial, sans-serif;
  background-color: #ffffff; /* White background */
  color: #333; /* Dark text for readability */
  margin: 0;
  padding: 0;
}

nav {
  background: #ffffff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0080FF; /* Electric blue border */
  box-shadow: 0 2px 10px rgba(0, 128, 255, 0.1);
}

nav a {
  color: var(--theme-primary, #0080FF);
  text-decoration: none;
  margin-right: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

nav a:hover {
  color: var(--theme-primary-hover, #0066CC);
  text-shadow: 0 0 5px rgba(0, 128, 255, 0.3);
}

h1,
h2,
h3 {
  color: #0080FF; /* Electric blue headers */
  font-weight: 600;
}

button {
  background: var(--theme-primary, #0080FF);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 128, 255, 0.2);
}

button:hover {
  background: var(--theme-primary-hover, #0066CC);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 128, 255, 0.3);
}

input,
select,
textarea {
  background: #ffffff;
  border: 2px solid #e0e6ed;
  padding: 0.75rem;
  border-radius: 8px;
  color: #333;
  transition: all 0.3s ease;
  font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--theme-primary, #0080FF);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
}

/* Unified button system with electric blue and white theme */
.btn {
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}
.btn-primary {
  background: #0080FF;
  color: #ffffff;
  border: 2px solid #0080FF;
  box-shadow: 0 2px 10px rgba(0, 128, 255, 0.2);
}
.btn-primary:hover {
  background: #0066CC;
  border-color: #0066CC;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 128, 255, 0.3);
}
.btn-danger {
  background: #ff4757;
  color: #ffffff;
  border: 2px solid #ff4757;
}
.btn-danger:hover {
  background: #ff3742;
  border-color: #ff3742;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: #0080FF;
  border: 2px solid #0080FF;
}
.btn-ghost:hover {
  background: #0080FF;
  color: #ffffff;
  transform: translateY(-2px);
}
.btn-ghost.active {
  background: rgba(0, 128, 255, 0.1);
  color: #0066CC;
  border-color: #0066CC;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

panel {
  background: #ffffff;
  border: 2px solid #e0e6ed;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 128, 255, 0.1);
  padding: 1.5rem;
  margin: 1rem 0;
}

.panel h2 {
  color: #0080FF;
}

.panel ul {
  list-style: none;
  padding: 0;
}

.panel ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.panel ul li:last-child {
  border-bottom: none;
}

/* Responsive helpers */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.two-column {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.full-width {
  width: 100%;
}

/* Make nav collapse on small screens */
.nav-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 900px) {
  .two-column {
    grid-template-columns: 1fr;
  }
  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  nav a {
    margin-right: 0;
  }
  button {
    width: 100%;
    box-sizing: border-box;
  }
  input,
  select,
  textarea {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 0 0.75rem;
  }
  header .site-top {
    padding: 0.6rem 0.75rem;
  }
  .live-price {
    font-size: 1.8rem;
  }
  #wordChart,
  #blurbChart {
    height: 220px !important;
    max-height: 220px !important;
  }
  .subnav {
    gap: 0.4rem;
  }
}

/* Utility: center modal-like elements */
.centered-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1400;
}

/* Calculator card styles */
.calc-panel {
  position: absolute;
  z-index: 1200;
}
.calc-card {
  background: #ffffff;
  color: #333;
  border: 1px solid #e0e6ed;
  border-radius: 12px;
  padding: 12px;
  width: 360px;
  box-shadow: 0 10px 32px rgba(0, 128, 255, 0.15);
}
.calc-card .small {
  color: #666;
}
.calc-input {
  width: 120px;
  padding: 0.5rem;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  background: #ffffff;
  color: #333;
}
.calc-card .primary {
  background: #0080FF;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  border: none;
}
.calc-card .ghost {
  background: transparent;
  color: #333333;
  border: 1px solid #ccc;
}
.calc-card .btn-ghost {
  background: transparent;
  color: #333333;
  border: 1px solid #ccc;
}
.calc-card .btn-ghost.active {
  background: rgba(0, 128, 255, 0.1);
  color: #0080FF;
  border-color: #0080FF;
}
.calc-results {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #333;
}

@media (max-width: 540px) {
  .calc-card {
    width: calc(100% - 32px) !important;
    margin: 0 auto;
    border-radius: 12px 12px 8px 8px !important;
  }
  .calc-input {
    width: 100%;
  }
  .calc-card .primary,
  .calc-card .ghost {
    width: 100%;
    display: block;
    box-sizing: border-box;
  }
}

/* Color coding for gains and losses */
.positive {
  color: #28a745 !important;
}

.negative {
  color: #dc3545 !important;
}
