/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  background: #3b3b3b;
  color: #E6E6E6;
  padding: 24px;
  line-height: 1.7;
  font-size: 15px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  background: #3b3b3b;
  padding: 24px;
  margin-bottom: 24px;
  border-top: 1px solid #E6E6E6;
  border-bottom: 1px solid #E6E6E6;
  position: relative;
}

.header h1 {
  color: #E6E6E6;
  margin-bottom: 12px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.reset-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 8px 16px;
  font-size: 12px;
  background: transparent;
  color: #E6E6E6;
  border: 1px solid #E6E6E6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-btn:hover {
  background: #E6E6E6;
  color: #3b3b3b;
  border-color: #E6E6E6;
}

.stats {
  display: flex;
  justify-content: space-around;
  font-size: 14px;
  background: #404040;
  padding: 12px;
  margin-top: 12px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  color: #BDBDBD;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  color: #E6E6E6;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.6px;
}

/* Panels */
.panel {
  background: #3b3b3b;
  padding: 24px;
  margin-bottom: 24px;
  border-top: 1px solid #E6E6E6;
  border-bottom: 1px solid #E6E6E6;
}

.panel h2 {
  color: #E6E6E6;
  margin-bottom: 16px;
  padding-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* New Movie Panel */
.movie-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: #8A8A8A;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group select {
  background: #3b3b3b;
  color: #E6E6E6;
  border: 1px solid #E6E6E6;
  padding: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
}

/* Reusable select element with constrained width */
select.select-constrained {
  width: 33%;
  max-width: 400px;
  min-width: 250px;
  background: #3b3b3b;
  color: #E6E6E6;
  border: 1px solid #E6E6E6;
  padding: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
}

.budget-display {
  text-align: center;
  padding: 16px;
  background: #404040;
  margin-bottom: 15px;
}

.budget-label {
  color: #8A8A8A;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.budget-value {
  color: #E6E6E6;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.8px;
}

button {
  background: transparent;
  color: #E6E6E6;
  border: 1px solid #E6E6E6;
  padding: 10px 20px;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  background: #E6E6E6;
  color: #3b3b3b;
  border-color: #E6E6E6;
}

button:disabled {
  background: transparent;
  border-color: #555555;
  color: #555555;
  cursor: not-allowed;
}

/* Primary action button - filled background */
.btn-primary {
  background: #E6E6E6;
  color: #3b3b3b;
  border: 1px solid #E6E6E6;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-primary:hover {
  background: #FFFFFF;
  color: #3b3b3b;
  border-color: #FFFFFF;
}

.btn-primary:disabled {
  background: #555555;
  border-color: #555555;
  color: #8A8A8A;
  cursor: not-allowed;
}

/* Secondary action button - keep existing bordered style */
.btn-secondary {
  background: transparent;
  color: #E6E6E6;
  border: 1px solid #E6E6E6;
  padding: 10px 20px;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-secondary:hover {
  background: #E6E6E6;
  color: #3b3b3b;
  border-color: #E6E6E6;
}

.btn-secondary:disabled {
  background: transparent;
  border-color: #555555;
  color: #555555;
  cursor: not-allowed;
}

/* Focus states for accessibility */
button:focus,
.nav-tab:focus,
select:focus,
input:focus {
  outline: 2px solid #E6E6E6;
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
.nav-tab:focus:not(:focus-visible) {
  outline: none;
}

/* Active Movies */
.active-movie {
  background: #3b3b3b;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #E6E6E6;
}

.movie-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.movie-title {
  color: #E6E6E6;
  font-weight: 600;
  font-size: 14px;
}

.movie-info {
  color: #8A8A8A;
  font-size: 12px;
}

.progress-bar {
  background: #3b3b3b;
  height: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid #E6E6E6;
}

.progress-fill {
  background: #E6E6E6;
  height: 100%;
  transition: width 0.1s linear;
}

.movie-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #8A8A8A;
}

/* Upgrades */
.upgrades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.upgrade-card {
  background: #3b3b3b;
  padding: 20px;
  border: 1px solid #E6E6E6;
}

.upgrade-card.purchased {
  border-color: #555555;
  color: #555555;
}

.upgrade-name {
  color: #E6E6E6;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.upgrade-cost {
  color: #8A8A8A;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.upgrade-card button {
  margin-top: 12px;
  width: 100%;
}

/* Upgrade categories */
.upgrade-category {
  margin-bottom: 20px;
  padding: 16px;
  background: #3b3b3b;
  border: 1px solid #E6E6E6;
}

.upgrade-category h3 {
  color: #E6E6E6;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  border-bottom: 1px solid #E6E6E6;
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.upgrade-category .upgrades-grid {
  margin-top: 10px;
}

/* Archive */
.archive-movie {
  background: #3b3b3b;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #E6E6E6;
}

.outcome-CULT { color: #E6E6E6; font-weight: 600; }
.outcome-BLOCKBUSTER { color: #E6E6E6; font-weight: 600; }
.outcome-HIT { color: #C0C0C0; font-weight: 600; }
.outcome-MODEST { color: #8A8A8A; }
.outcome-BREAK-EVEN { color: #707070; }
.outcome-FLOP { color: #555555; font-weight: 600; }

.profit-positive { color: #E6E6E6; }
.profit-negative { color: #555555; }

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  background: #3b3b3b;
  padding: 12px;
  border-top: 1px solid #E6E6E6;
  border-bottom: 1px solid #E6E6E6;
}

.nav-tab {
  flex: 1;
  padding: 10px 20px;
  background: transparent;
  color: #8A8A8A;
  border: 1px solid #8A8A8A;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-tab:hover {
  background: #E6E6E6;
  color: #3b3b3b;
  border-color: #E6E6E6;
}

.nav-tab.active {
  background: #E6E6E6;
  color: #3b3b3b;
  border-color: #E6E6E6;
  cursor: default;
}

.view-container {
  display: none;
}

.view-container.active {
  display: block;
}

/* Utility */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: #3b3b3b;
  border: 2px solid #E6E6E6;
  padding: 40px;
  max-width: 500px;
  width: 90%;
}
