/* styles.css */

/* General Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #1a1a1a;
  color: #e0e0e0;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

h1, h2 {
  color: #d4a017;
  margin-bottom: 15px;
  text-align: center;
}

h1 {
  font-size: 2em;
}

h2 {
  font-size: 1.5em;
}

/* Form and Input Sections */
section {
  margin-bottom: 20px;
}

/* Character Info */
label {
  display: block;
  margin-bottom: 10px;
  font-size: 1em;
}

input[type="number"] {
  width: 100px;
  padding: 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #333;
  color: #e0e0e0;
  font-size: 1em;
}

input[type="number"]:focus {
  outline: none;
  border-color: #d4a017;
  box-shadow: 0 0 5px rgba(212, 160, 23, 0.5);
}

/* Resistance Form (Template Dropdown) */
#resistanceForm {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #333;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#resistanceForm label {
  font-size: 1.1em;
  color: #d4a017;
}

#resistanceForm select {
  width: 200px;
  padding: 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #444;
  color: #e0e0e0;
  font-size: 1em;
  cursor: pointer;
}

#resistanceForm select:focus {
  outline: none;
  border-color: #d4a017;
  box-shadow: 0 0 5px rgba(212, 160, 23, 0.5);
}

#resistanceForm select option {
  background-color: #444;
  color: #e0e0e0;
}

/* Resistances Section */
.resistances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 15px;
  background-color: #333;
  border-radius: 6px;
}

.resistances label {
  display: flex;
  flex-direction: column;
  font-size: 0.9em;
}

.resistances input[type="number"] {
  width: 60px;
  margin-top: 5px;
  padding: 6px;
}

/* Location Locks Section */
.locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  padding: 15px;
  background-color: #333;
  border-radius: 6px;
}

.locations label {
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 5px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Calculate Button */
button {
  display: block;
  width: 200px;
  margin: 20px auto;
  padding: 10px;
  background-color: #d4a017;
  color: #1a1a1a;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #e0b020;
}

button:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(212, 160, 23, 0.5);
}

/* Results Section */
#results {
  padding: 15px;
  background-color: #333;
  border-radius: 6px;
}

#combinations {
  font-size: 0.9em;
}

#combinations ul {
  list-style: none;
  padding: 0;
}

#combinations ul li {
  margin-bottom: 10px;
  padding: 8px;
  background-color: #3a3a3a;
  border-radius: 4px;
}

/* Highlight component name and location */
.component-name {
  font-weight: bold;
  color: #d4a017;
  text-shadow: 0 0 2px rgba(212, 160, 23, 0.5);
}

.component-location {
  font-style: italic;
  color: #b0b0b0;
  background-color: #444;
  padding: 2px 6px;
  border-radius: 3px;
  margin: 0 5px;
}

/* Resistance details */
.component-details {
  color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .resistances, .locations {
    grid-template-columns: 1fr;
  }

  .resistances input[type="number"] {
    width: 100%;
  }

  #resistanceForm select {
    width: 100%;
  }

  button {
    width: 100%;
  }
}