/* Pixel comparator — golden luxury */

.tool-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.pixel-comparator-tool {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.upload-section {
  margin-bottom: 25px;
}

.upload-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.upload-item {
  width: 100%;
}

.upload-area {
  width: 100%;
  min-height: 200px;
  padding: 40px;
  background: #fffaf2;
  border: 2px dashed rgba(145, 103, 48, 0.35);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.upload-area:hover {
  border-color: #ab7c34;
  background: rgba(182, 138, 58, 0.06);
}

.upload-area.dragover {
  border-color: #ab7c34;
  background: rgba(182, 138, 58, 0.12);
}

.upload-area.image-selected {
  border-color: #ab7c34;
  border-style: solid;
  background: rgba(182, 138, 58, 0.1);
  padding: 15px;
}

.upload-area.image-selected:hover {
  background: rgba(182, 138, 58, 0.14);
}

.image-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}

.image-preview img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid rgba(145, 103, 48, 0.25);
  object-fit: contain;
}

.image-preview .image-name {
  color: #7a5526;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
  word-break: break-all;
  max-width: 100%;
  padding: 0 10px;
}

.image-preview .checkmark {
  position: absolute;
  top: 5px;
  right: 5px;
  color: #5a7c3a;
  font-size: 1.5rem;
  background: rgba(255, 252, 246, 0.95);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkmarkAppear 0.3s ease;
  border: 1px solid rgba(145, 103, 48, 0.2);
}

@keyframes checkmarkAppear {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.upload-area i {
  font-size: 3rem;
  color: #b98b3b;
}

.upload-area p {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1rem;
  margin: 0;
}

.controls-section {
  margin-bottom: 25px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-group label {
  color: #5e4329;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group input[type='range'] {
  width: 100%;
  height: 6px;
  background: rgba(145, 103, 48, 0.15);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.control-group input[type='color'] {
  width: 100%;
  height: 50px;
  padding: 5px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.control-group input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.control-group input[type='color']::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.control-group input[type='color']::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.control-group input[type='color']:hover {
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.12);
  transform: scale(1.02);
}

.control-group input[type='color']:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.16);
}

.control-group input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-radius: 50%;
  cursor: pointer;
}

.control-group input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(180deg, #bc8e3d, #9f742f);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.comparison-section {
  margin-bottom: 25px;
}

.comparison-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.comparison-item {
  background: #fffaf2;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.comparison-item h3 {
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 15px 0;
  text-align: center;
}

.comparison-item canvas {
  width: 100%;
  height: auto;
  border-radius: 4px;
  max-width: 100%;
}

.stats-section {
  background: #fffaf2;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.15);
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-label {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1rem;
  font-weight: 500;
}

.stat-value {
  color: #7a5526;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.sizes-section {
  margin-bottom: 25px;
}

.sizes-section h3 {
  color: #5e4329;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.size-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 12px;
  color: #4a351f;
  cursor: pointer;
  transition: all 0.3s ease;
}

.size-option:hover {
  border-color: #ab7c34;
  background: rgba(182, 138, 58, 0.08);
}

.size-option input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.download-section {
  margin-bottom: 25px;
}

.download-section h3 {
  color: #5e4329;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.favicons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.favicon-item {
  background: #fffaf2;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.15);
  text-align: center;
}

.favicon-preview {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  border-radius: 4px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.favicon-size {
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.download-btn {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(145, 103, 48, 0.28);
}

.category-tab {
  padding: 10px 20px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 12px;
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-tab:hover {
  border-color: rgba(171, 124, 52, 0.45);
  color: #4a351f;
}

.category-tab.active {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  border-color: transparent;
  color: #fff8ef;
}

.converter-form {
  margin-bottom: 25px;
}

.conversion-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.input-group {
  flex: 1;
  display: flex;
  gap: 10px;
}

.input-group .form-input {
  flex: 1;
}

.unit-select {
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.unit-select:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.swap-btn {
  padding: 12px;
  background: rgba(182, 138, 58, 0.12);
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 12px;
  color: #7a572c;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn:hover {
  background: rgba(182, 138, 58, 0.22);
  border-color: #ab7c34;
  transform: rotate(180deg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #5e4329;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.form-input::placeholder {
  color: #8c7558;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  color: #7a572c;
  border: 2px solid rgba(145, 103, 48, 0.4);
}

.btn-secondary:hover {
  background: rgba(182, 138, 58, 0.12);
  color: #5e4329;
  transform: scale(1.05);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.result-header h3 {
  color: #5e4329;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.result-card {
  background: rgba(182, 138, 58, 0.06);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(145, 103, 48, 0.1);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1rem;
  font-weight: 500;
}

.result-value {
  color: #7a5526;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.hash-type-icon {
  font-size: 2.5rem;
  color: #b98b3b;
}

.hash-type-info h4 {
  color: #4a351f;
  font-size: 1.5rem;
  margin: 0 0 5px 0;
}

.hash-type-info p {
  color: rgba(88, 64, 38, 0.65);
  margin: 0;
  font-size: 0.95rem;
}

.hash-details {
  display: grid;
  gap: 15px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 252, 246, 0.85);
  border-radius: 6px;
}

.detail-label {
  color: rgba(88, 64, 38, 0.72);
  font-weight: 500;
}

.detail-value {
  color: #7a5526;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.error-message {
  background: rgba(173, 82, 47, 0.12);
  border: 1px solid rgba(154, 63, 43, 0.26);
  color: #9a3f2b;
  padding: 15px;
  border-radius: 12px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .tool-container {
    padding: 0 15px;
  }

  .pixel-comparator-tool {
    padding: 20px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hash-type-card {
    flex-direction: column;
    text-align: center;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  #resetBtn.btn-secondary {
    border-width: 1px;
  }
}
