body { 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  padding: 20px; 
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin: 0;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  padding: 25px;
  position: relative;
}

h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 25px;
  font-size: 28px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
  position: relative;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

input, select {
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.table-wrapper {
  overflow: auto;
  max-height: 75vh;
  margin-top: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
}

th, td {
  border: 1px solid #e0e0e0;
  padding: 12px 15px;
  text-align: center;
}

th {
  background: linear-gradient(to bottom, #3498db, #2980b9);
  color: white;
  font-weight: 600;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 10;
  user-select: none;
}

th:hover {
  background: linear-gradient(to bottom, #2980b9, #2573a7);
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

tr:hover {
  background-color: #f1f8ff;
}

.attr-心 { color: #e74c3c; font-weight: bold; }
.attr-技 { color: #2ecc71; font-weight: bold; }
.attr-体 { color: #3498db; font-weight: bold; }
.attr-力 { color: #7f8c8d; font-weight: bold; }
.attr-知 { color: #9b59b6; font-weight: bold; }

.equip-name {
  font-weight: bold;
  color: #2c3e50;
}

.equip-name-jp {
  font-size: 0.9em;
  color: #7f8c8d;
}

.home-btn, .back-btn, #backBtn {
  padding: 12px 25px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.home-btn {
  width: 300px;
  padding: 20px;
  font-size: 20px;
}

.home-btn:hover, .back-btn:hover, #backBtn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.back-btn {
  position: absolute;
  top: 10px;
  right: 25px;
  margin: 0;
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 14px;
  color: #7f8c8d;
}

.property-cell {
  font-weight: bold;
}

.property-cell.high-value {
  color: #e74c3c;
}

.property-cell.medium-value {
  color: #f39c12;
}

.level-comparison {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.level-comparison h3 {
  margin-top: 0;
  color: #2c3e50;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.comparison-item {
  background: white;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comparison-item h4 {
  margin-top: 0;
  color: #3498db;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

.modal-content-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto;
  max-width: 90%;
  max-height: 80vh;
  position: relative;
}

.zoom-controls {
  position: absolute;
  left: -70px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 15px 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 1001;
  min-width: 60px;
}

.zoom-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #3498db;
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: #2980b9;
  transform: scale(1.1);
}

.zoom-btn:active {
  transform: scale(0.95);
}

.custom-slider-container {
  position: relative;
  height: 180px;
  margin: 15px 0;
  display: flex;
  justify-content: center;
}

.custom-slider {
  -webkit-appearance: slider-vertical;
  width: 25px;
  height: 180px;
  margin: 0;
  padding: 0;
  background: transparent;
  outline: none;
  position: absolute;
  z-index: 10;
  opacity: 0;
}

.slider-track {
  position: absolute;
  width: 8px;
  height: 180px;
  background: #e0e0e0;
  border-radius: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.slider-thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  background: #3498db;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 11;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.zoom-value {
  margin-top: 15px;
  font-weight: bold;
  color: #2c3e50;
  font-size: 16px;
  min-width: 45px;
  text-align: center;
  background: #f8f9fa;
  padding: 5px;
  border-radius: 4px;
}

.modal-image-wrapper {
  max-width: 100%;
  max-height: 80vh;
  overflow: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  cursor: grab;
}

.modal-image-wrapper.grabbing {
  cursor: grabbing;
}

.modal-content {
  display: block;
  max-width: 100%;
  transition: transform 0.2s ease-out;
  transform-origin: top left;
}

.closeBtn {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.2s ease;
}

.closeBtn:hover { 
  color: #bbb;
  transform: scale(1.1);
}

.reset-btn {
  background: #e74c3c !important;
  margin-top: 15px;
}

.reset-btn:hover {
  background: #c0392b !important;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

.autocomplete-suggestions {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  width: calc(100% - 30px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestion {
  padding: 10px;
  cursor: pointer;
}

.autocomplete-suggestion:hover {
  background: #f1f8ff;
}

.total-panel {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.total-panel h3 {
  margin-top: 0;
  color: #2c3e50;
}

.equip-selection {
  margin-bottom: 20px;
}

@media (max-width: 968px) {
  .zoom-controls {
    left: 10px;
    top: 70px;
    transform: none;
    flex-direction: row;
    align-items: center;
    padding: 10px 15px;
  }
  
  .custom-slider-container {
    height: 25px;
    width: 180px;
    margin: 0 15px;
  }
  
  .custom-slider {
    width: 180px;
    height: 25px;
    -webkit-appearance: slider-horizontal;
  }
  
  .slider-track {
    width: 180px;
    height: 8px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }
  
  .slider-thumb {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }
  
  .zoom-value {
    margin-top: 0;
    margin-left: 15px;
  }
  
  .reset-btn {
    margin-top: 0;
    margin-left: 15px;
  }
}

@media (max-width: 768px) {
  .filters { grid-template-columns: 1fr; }
  .container { padding: 15px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .modal-content-container {
    flex-direction: column;
    align-items: center;
  }
  .zoom-controls {
    position: relative;
    left: 0;
    top: 0;
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
    justify-content: center;
  }
}

@media (max-width: 1200px) {
  table {
    min-width: 1000px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
}

.prop-colored {
  color: white;
  font-weight: bold;
  text-shadow: 
    -1px -1px 0 #333,
     1px -1px 0 #333,
    -1px  1px 0 #333,
     1px  1px 0 #333,
     0px  2px 4px rgba(0,0,0,0.5);
  transition: background-color 0.3s;
  cursor: pointer;
}

.stat-input {
  width: 60px;
  text-align: center;
  padding: 4px;
  margin: 0;
  border: 2px solid #3498db;
  border-radius: 4px;
  font-size: inherit;
  font-weight: bold;
  background: rgba(255,255,255,0.9);
  color: #333;
}

.add-character-panel {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #2ecc71;
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.add-character-panel input,
.add-character-panel select {
  width: auto;
}

.add-btn {
  padding: 12px 25px;
  background: #2ecc71;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
}