/* Main Styles for Startup Tycoon */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Courier New", monospace; /* Classic retro font */
}

body {
  background-color: #121212;
  color: #33ff33; /* Classic terminal green */
  line-height: 1.6;
}

/* Game Container Styles */
.game-container {
  width: 98%;
  max-width: 1280px;
  margin: 10px auto;
  background-color: #1a1a1a;
  border: 2px solid #33ff33;
  box-shadow: 0 0 10px rgba(51, 255, 51, 0.5);
  overflow: hidden;
  position: relative;
}

/* Header Styles */
.game-header {
  padding: 10px 20px;
  background-color: #1a1a1a;
  border-bottom: 2px solid #33ff33;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.game-title {
  font-size: 2rem;
  color: #33ff33;
  text-shadow: 0 0 5px rgba(51, 255, 51, 0.7);
}

.about-link {
  color: #33ff33;
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid #33ff33;
  border-radius: 3px;
  margin-left: 15px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.about-link:hover {
  background-color: #33ff33;
  color: #121212;
  box-shadow: 0 0 5px rgba(51, 255, 51, 0.7);
}

.game-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.stat-item {
  padding: 5px 10px;
  background-color: #222;
  border: 1px solid #33ff33;
  border-radius: 3px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  width: 40px;
  height: 40px;
  position: relative;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  position: absolute;
  height: 3px;
  width: 30px;
  background-color: #33ff33;
  transition: transform 0.3s;
}

.menu-icon {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  left: 0;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  bottom: -8px;
}

.mobile-menu-toggle.active .menu-icon {
  background-color: transparent;
}

.mobile-menu-toggle.active .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.mobile-menu-toggle.active .menu-icon::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* Game Content Layout */
.game-content {
  display: flex;
  height: calc(100vh - 130px);
  min-height: 600px;
}

.sidebar {
  width: 230px;
  background-color: #1a1a1a;
  border-right: 2px solid #33ff33;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s ease;
}

.main-panel {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* Panel Styles */
.panel {
  background-color: #222;
  border: 1px solid #33ff33;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 3px;
}

.panel h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #33ff33;
}

/* Button Styles */
button {
  background-color: #333;
  color: #33ff33;
  border: 1px solid #33ff33;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

button:hover {
  background-color: #444;
  box-shadow: 0 0 5px rgba(51, 255, 51, 0.7);
}

.primary-button {
  background-color: #005500;
  font-weight: bold;
}

.primary-button:hover {
  background-color: #007700;
}

.secondary-button {
  background-color: #333333;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-button {
  text-align: left;
  padding: 10px;
  width: 100%;
}

.menu-button.active {
  background-color: #005500;
  font-weight: bold;
}

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

/* Screen Styles */
.screen {
  height: 100%;
}

.screen h2 {
  border-bottom: 1px solid #33ff33;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* Form Controls */
input,
select {
  background-color: #333;
  color: #33ff33;
  border: 1px solid #33ff33;
  padding: 8px;
  width: 100%;
  margin-top: 5px;
  font-family: "Courier New", monospace;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
}

/* Notifications */
.notifications {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  z-index: 1000;
}

.notification {
  background-color: #222;
  border: 1px solid #33ff33;
  color: #33ff33;
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(51, 255, 51, 0.5);
  transition: all 0.3s;
}

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

.modal-content {
  background-color: #1a1a1a;
  border: 2px solid #33ff33;
  padding: 20px;
  border-radius: 5px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 0 20px rgba(51, 255, 51, 0.7);
  text-align: center;
}

.modal-content p {
  margin: 15px 0;
  line-height: 1.5;
}

.modal-content a {
  color: #33ff33;
  text-decoration: none;
  border-bottom: 1px solid #33ff33;
  transition: all 0.2s;
}

.modal-content a:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-shadow: 0 0 5px rgba(51, 255, 51, 0.7);
}

.modal h2 {
  margin-bottom: 20px;
  text-align: center;
}

.modal button {
  margin-top: 15px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .game-content {
    flex-direction: column;
    height: auto;
    min-height: auto;
    position: relative;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #33ff33;
    padding: 10px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transform: translateY(-100%);
    max-height: 0;
    overflow: hidden;
    transition: transform 0.3s ease, max-height 0.3s ease;
  }

  .sidebar.active {
    transform: translateY(0);
    max-height: 100vh;
    overflow-y: auto;
  }

  .main-panel {
    padding: 15px;
    height: auto;
    min-height: 400px;
    margin-top: 0;
    transition: margin-top 0.3s ease;
  }

  .main-panel.sidebar-active {
    margin-top: 300px; /* Adjust based on sidebar height */
  }

  .game-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .header-left {
    width: 100%;
    justify-content: space-between;
  }

  .game-stats {
    margin-top: 10px;
    width: 100%;
    justify-content: space-between;
  }

  .stat-item {
    font-size: 0.9rem;
    padding: 4px 8px;
    margin-bottom: 5px;
  }

  .game-title {
    font-size: 1.6rem;
    margin-bottom: 5px;
  }

  .menu-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .action-buttons {
    margin-top: 15px;
  }

  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .notifications {
    width: 90%;
    right: 5%;
    bottom: 10px;
  }
}

@media (max-width: 480px) {
  .game-container {
    width: 100%;
    margin: 0;
    border-width: 0;
  }

  .game-title {
    font-size: 1.4rem;
  }

  .game-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .menu-buttons {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 10px;
  }

  .modal h2 {
    font-size: 1.2rem;
  }

  .form-group {
    margin-bottom: 10px;
  }

  input,
  select {
    padding: 6px;
  }

  button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 320px) {
  .game-title {
    font-size: 1.2rem;
  }

  .stat-item {
    font-size: 0.8rem;
    padding: 3px 6px;
  }

  .panel h2,
  .screen h2 {
    font-size: 1.1rem;
  }
}
