body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    text-align: center;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #393939;
  color: #ffffff;
}

body.dark-mode .title-card {
  background: #2f2f2f;
  color: #ffffff;
}

/* Update buttons */
body.dark-mode button {
  background-color: #555;
  color: #fff;
}

/* Mod card adjustments */
body.dark-mode .mod-card {
  background: #1e1e1e;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.1);
}

/* Optionally, adjust links */
body.dark-mode a {
  color: #8abfff;
}

body.dark-mode .mod-card h3,
body.dark-mode .mod-card p,
body.dark-mode .mod-card a,
body.dark-mode .mod-card button {
  color: #fff;
}

.title-card {

    background: #007bff;
    color: white;
    padding: 20px;
    margin: -20px -20px 0px -20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}


.search-container {
    margin-bottom: 20px;
}

#searchInput {
    width: 60%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

.pagination-controls {
    margin-bottom: 10px;
}

/* Mod list grid layout: 1-4 cards responsive */
.mod-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

/* Uniform mod card design */
.mod-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
    min-height: 460px;
    max-height: 460px;
}

.mod-card:hover {
    transform: scale(1.03);
}

.mod-image {
    width: 110%;
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.mod-info {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.mod-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mod-info button,
.mod-info a {
    margin-top: 10px;
}

/* Selected mods section styling */
.currentList {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.currentList h2 {
    margin-bottom: 20px;
}

.mod-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Improve textarea styling */
.inputMods {
    width: 50%;
    height: 60px;
    margin: 0 auto 15px auto;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    resize: vertical;
    font-size: 14px;
    background-color: #fafafa;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    display: block;
}

.inputMods:focus {
    outline: none;
    border-color: #007bff;
    background-color: #fff;
}

.add-mods-button {
    padding: 8px 16px;
    font-size: 14px;
    margin-top: 8px;
    background-color: #007bff;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.add-mods-button:hover {
    background-color: #0056b3;
}

#selectedMods {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#selectedMods div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#selectedMods span {
    font-size: 15px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

#selectedMods button {
    padding: 5px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

#selectedMods button:hover {
    background-color: #a71d2a;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #searchInput {
        width: 100%;
        font-size: 14px;
    }

    .mod-list {
        grid-template-columns: 1fr;
    }

    .mod-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .mod-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) and (max-width: 1400px) {
    .mod-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1401px) {
    .mod-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Scenario overlay styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .overlay-content {
    background: white;
    color: black;
    max-width: 90%;
    width: 500px;
    padding: 20px;
    border-radius: 10px;
    overflow-y: auto;
    max-height: 80%;
    position: relative;
  }
  
  .overlay-content h2 {
    margin-top: 0;
  }
  
  .overlay-content button {
    margin-top: 5px;
  }
  
  .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 1.2em;
  }
  
  .hidden {
    display: none;
  }
