/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
  }
  
  /* Game Container */
  #game-container {
    display: flex;
    width: 100vw;
    height: 100vh;
  }
  
  /* Player Sides */
  .player-side {
    width: 30%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  #city-player {
    background-color: #800000; /* Dark Red */
    color: #fff;
  }
  
  #grid-player {
    background-color: #333333; /* Dark Grey */
    color: #fff;
  }
  
  .player-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  
  .player-content h2 {
    margin-top: 0;
  }
  
  /* Background Images */
  .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 1;
  }
  
  /* Dashboard */
  #dashboard {
    width: 40%;
    background-color: #fff;
    color: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .dashboard-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    text-align: center;
  }
  
  .dashboard-content h2 {
    margin-top: 0;
  }
  
  /* Grid Balance Bar */
  .grid-balance-bar {
    position: relative;
    width: 100%;
    height: 30px;
    background-color: #ccc;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
  }
  
  #balance-bar-inner {
    height: 100%;
    width: 50%; /* Will be updated dynamically */
    background-color: green;
    transition: width 0.5s;
  }
  
  .grid-balance-bar p {
    position: absolute;
    top: 5px;
    left: 10px;
    margin: 0;
    font-weight: bold;
    text-align: center;
    width: calc(100% - 20px);
  }
  
  .blackout-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 15px 30px;
    border-radius: 0 0 10px 10px;
    font-weight: bold;
    text-align: center;
    width: 40%; /* Match dashboard width */
    z-index: 1000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: blink 1s infinite;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  @keyframes blink {
    0% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scale(1.02); }
    100% { opacity: 1; transform: translateX(-50%) scale(1); }
  }
  
  /* Fuel Prices */
  .fuel-prices {
    margin-bottom: 10px;
  }
  
  .fuel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .fuel-item {
    width: 80%;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    text-align: center;
  }
  
  .fuel-item p {
    margin: 5px 0;
  }
  
  /* Production and Consumption */
  .production-consumption {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
  .production-consumption p {
    margin: 5px 0;
  }
  
  /* Carbon Tax */
  .carbon-tax {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
  .carbon-tax p {
    margin: 5px 0;
  }
  
  /* Active Event */
  .active-event {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
  .active-event p {
    margin: 5px 0;
  }
  
  /* Turn Info */
  .turn-info {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
  .turn-info p {
    margin: 5px 0;
  }
  
  /* Stats */
  .stats {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
  .stats p {
    margin: 5px 0;
  }
  
  /* Turn Actions */
  .turn-actions {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
  .turn-actions ol {
    padding-left: 0;
    list-style-position: inside;
  }
  
  .turn-actions li {
    color: #fff;
    text-align: left;
    margin: 5px 0;
  }
  
  .turn-actions li.completed {
    color: #00ff00; /* Green */
  }
  
  /* Hands and Boards */
  .hand, .board, .pending {
    margin-bottom: 10px;
  }

  .under-construction {
    background-color: #e0e0e0; 
    padding: 10px; 
    margin-bottom: 5px; 
    border-radius: 5px;
    text-align: center;
  }
  
  .card-container, .asset-container, .policy-container, .research-container, .pending-container, .construction-container, .upgrade-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  
  .card {
    width: 80px;
    min-height: 120px;
    background-color: #fff;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #ccc;
  }
  
  .card.deactivated {
    opacity: 0.5;
    filter: grayscale(100%);
    /*cursor: not-allowed;*/
  }
  
  .card:hover {
    border-color: #000;
  }
  
  .card .card-type-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: red; /* Will be changed per card type */
  }
  
  .card .card-content {
    padding: 5px;
    text-align: center;
    font-size: 12px;
    color: #000;
    margin-top: 15px;
    height: 100%;
    box-sizing: border-box;
  }
  
  .card .card-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 5px auto;
    background-size: contain;
    background-repeat: no-repeat;
  }
  
  /* Actions */
  .actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .actions button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
  }
  
  /* Icons */
  .icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 5px;
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
  }
  
  .modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    width: 80%;
    max-height: 90%;
    overflow-y: auto;
    border-radius: 5px;
    position: relative;
    text-align: center;
  }
  
  .close-button {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }
  
  /* Options Modal */
  .options-content h2 {
    margin-top: 0;
  }
  
  .options-submenu {
    margin-bottom: 10px;
  }
  
  .options-submenu button {
    margin-right: 5px;
    padding: 5px 10px;
    cursor: pointer;
  }
  
  #card-edit-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .card-edit {
    flex: 1 1 18%;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    min-width: 300px;
  }
  
  .card-edit h3 {
    margin-top: 0;
  }
  
  /* Restart Button */
  .options {
    margin-top: 10px;
  }
  
  .options button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
  }
  
  /* Active Event */
  .active-event {
    margin-bottom: 10px;
  }
  
  #event-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 140px;
  }
  
  #event-card {
    width: 100px;
    height: 140px;
    background-color: #fff;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    border: 1px solid #ccc;
  }
  
  #event-card .card-type-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: #ff5722; /* Event card color */
  }
  
  #event-card .card-content {
    padding: 5px;
    text-align: center;
    font-size: 12px;
    color: #000;
  }
  
  #event-card .card-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 5px auto;
    background-size: contain;
    background-repeat: no-repeat;
  }
  
  .player-side.inactive {
    opacity: 0.5;
    pointer-events: none;
  }
  
  .effect-edit, .effect-prerequisite-edit {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
  }
 
  #card-edit-container {
    margin-bottom: 15px;
  }

  .card-edit p input, .card-edit p textarea, .card-edit p select {
    display: block;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
  }

  .target-card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  
  .target-card-option {
    display: flex;
  }