/* Tool Container Styles */
.tool-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Timestamp Tool Styles — golden luxury */
.timestamp-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.2);
}

.conversion-section {
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 25px;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-button-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.input-button-wrapper input {
  flex: 1;
  margin-bottom: 0;
}

.input-button-wrapper .btn {
  white-space: nowrap;
}

.input-group input[type="text"],
.input-group input[type="date"],
.input-group input[type="time"],
.input-group input[type="datetime-local"] {
  width: 100%;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.26);
  border-radius: 8px;
  padding: 16px;
  color: #4a351f;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

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

.datetime-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 15px;
}

.date-input-wrapper,
.time-input-wrapper {
  position: relative;
  flex: 1;
}

.datetime-wrapper input[type="date"],
.datetime-wrapper input[type="time"] {
  width: 100%;
  margin-bottom: 0;
  padding-right: 40px;
  position: relative;
}

.datetime-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  background-size: contain;
  filter: sepia(0.4) hue-rotate(-15deg);
}

.datetime-wrapper input[type="time"]::-webkit-calendar-picker-indicator {
  display: none;
}

.datetime-convert-btn {
  width: 100%;
  margin-top: 0;
  display: block;
  margin-left: 0;
  margin-right: 0;
}

.input-group input[type="text"]::placeholder {
  color: #8c7558;
}

.input-group input[type="text"][readonly] {
  background: #fff8ef;
  cursor: not-allowed;
}

.current-timestamp-input {
  width: 100%;
  margin-bottom: 12px;
}

.current-time-wrapper {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.current-time-wrapper .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.current-time-wrapper .btn i {
  font-size: 0.9rem;
}

.error-message {
  background: rgba(173, 82, 47, 0.12);
  border: 1px solid rgba(154, 63, 43, 0.26);
  color: #9a3f2b;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  text-align: center;
  animation: errorSlide 0.3s ease;
}

@keyframes errorSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-section {
  margin-bottom: 25px;
  background: #fffaf2;
  border-radius: 12px;
  border: 1px solid rgba(145, 103, 48, 0.15);
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(182, 138, 58, 0.08);
  border-bottom: 1px solid rgba(145, 103, 48, 0.12);
}

.result-header h3 {
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-header h3 i {
  font-size: 1rem;
}

.copy-btn-small {
  background: transparent;
  border: 1px solid rgba(145, 103, 48, 0.28);
  color: #7a572c;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.copy-btn-small:hover {
  background: rgba(182, 138, 58, 0.12);
  border-color: #ab7c34;
  transform: scale(1.05);
}

.result-content {
  padding: 20px;
}

.results-output {
  background: #fff8ef;
  color: #4a351f;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.8;
  border: 1px solid rgba(145, 103, 48, 0.12);
}

.result-item {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(145, 103, 48, 0.1);
}

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

.result-label {
  color: #7a5526;
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.result-value {
  color: #4a351f;
  word-break: break-all;
}

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

  .timestamp-tool {
    padding: 25px 20px;
  }

  .datetime-wrapper {
    flex-direction: column;
    gap: 12px;
  }

  .datetime-convert-btn {
    width: 100%;
    margin-top: 0;
  }

  .current-time-wrapper {
    flex-direction: row;
    gap: 10px;
  }

  .current-time-wrapper .btn {
    flex: 1;
    width: auto;
  }

  .result-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .copy-btn-small.copied,
  #copyCurrentBtn.copied {
    animation: copyPulse 0.6s ease;
    box-shadow: 0 0 12px rgba(182, 138, 58, 0.35);
  }

  .copy-btn-small.copied svg,
  #copyCurrentBtn.copied svg {
    display: inline-block;
    vertical-align: middle;
  }

  @keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
  }

  .copy-btn-small {
    width: auto;
    flex-shrink: 0;
  }
}

.action-buttons.btn-contain-x {
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .action-buttons.btn-contain-x {
    flex-direction: column;
  }

  .action-buttons.btn-contain-x .btn {
    width: 100%;
  }
}
