/* ========================================
   Codetude Timestamp Converter - Estilos
   ======================================== */

:root {
  --time-primary: #a855f7;
  --time-success: #10b981;
  --time-light-bg: #ffffff;
  --time-light-surface: #f8fafc;
  --time-light-border: #e2e8f0;
  --time-light-text: #1e293b;
  --time-light-text-secondary: #64748b;
  --time-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark-mode {
  --time-light-bg: #1e293b;
  --time-light-surface: #0f172a;
  --time-light-border: #334155;
  --time-light-text: #e2e8f0;
  --time-light-text-secondary: #94a3b8;
  --time-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Container */
.codetude-timestamp-converter {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Seções */
.timestamp-section {
  background: var(--time-light-bg);
  border: 1px solid var(--time-light-border);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--time-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timestamp-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Headers */
.section-header {
  margin-bottom: 25px;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--time-light-text);
  margin: 0 0 10px 0;
}

.section-header h2 .icon {
  width: 28px;
  height: 28px;
  color: var(--time-primary);
  stroke-width: 2;
}

.section-description {
  color: var(--time-light-text-secondary);
  margin: 0;
  font-size: 15px;
}

/* Current Display */
.current-display {
  display: grid;
  gap: 15px;
}

.current-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.current-item label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--time-light-text-secondary);
  letter-spacing: 0.5px;
}

.value-display {
  display: flex;
  gap: 10px;
}

.value-display input {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid var(--time-light-border);
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 15px;
  font-weight: 600;
  background: var(--time-light-surface);
  color: var(--time-primary);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--time-primary);
  color: white;
}

.btn-primary:hover {
  background: #9333ea;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
  background: var(--time-light-surface);
  color: var(--time-light-text);
  border: 2px solid var(--time-light-border);
}

.btn-secondary:hover {
  background: var(--time-light-border);
}

.btn-copy {
  background: var(--time-success);
  color: white;
  padding: 8px 12px;
}

.btn-copy:hover {
  background: #059669;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* Converter Controls */
.converter-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--time-light-text);
}

.input-group input {
  padding: 12px 14px;
  border: 2px solid var(--time-light-border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--time-light-surface);
  color: var(--time-light-text);
  font-family: "Courier New", monospace;
  transition: border-color 0.2s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--time-primary);
}

.datetime-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Results */
.conversion-result {
  margin-top: 20px;
  padding: 20px;
  background: var(--time-light-surface);
  border-radius: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-item.full-width {
  grid-column: 1 / -1;
}

.result-item label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--time-light-text-secondary);
  letter-spacing: 0.5px;
}

.result-item input {
  padding: 10px 12px;
  border: 2px solid var(--time-light-border);
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  background: var(--time-light-bg);
  color: var(--time-light-text);
}

/* Calculator */
.calculator-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.diff-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.diff-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: var(--time-light-bg);
  border: 2px solid var(--time-primary);
  border-radius: 10px;
}

.diff-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--time-primary);
  font-family: "Courier New", monospace;
}

.diff-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--time-light-text-secondary);
  letter-spacing: 0.5px;
  margin-top: 5px;
}

.diff-summary {
  padding: 15px;
  background: var(--time-light-bg);
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  color: var(--time-light-text);
}

.diff-summary strong {
  color: var(--time-primary);
}

/* Info Cards */
.info-content {
  display: grid;
  gap: 20px;
}

.info-card {
  padding: 20px;
  background: var(--time-light-surface);
  border-left: 4px solid var(--time-primary);
  border-radius: 8px;
}

.info-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--time-light-text);
  margin: 0 0 12px 0;
}

.info-card p {
  color: var(--time-light-text-secondary);
  line-height: 1.6;
  margin: 0 0 10px 0;
}

.info-card ul {
  margin: 10px 0;
  padding-left: 25px;
  color: var(--time-light-text-secondary);
  line-height: 1.8;
}

.info-card strong {
  color: var(--time-light-text);
}

.code-examples {
  display: grid;
  gap: 15px;
  margin-top: 15px;
}

.code-example {
  background: var(--time-light-bg);
  border: 1px solid var(--time-light-border);
  border-radius: 8px;
  padding: 15px;
}

.code-example strong {
  display: block;
  color: var(--time-primary);
  margin-bottom: 10px;
  font-size: 14px;
}

.code-example pre {
  margin: 0;
  padding: 12px;
  background: #1e293b;
  border-radius: 6px;
  overflow-x: auto;
}

.code-example code {
  color: #e2e8f0;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.dark-mode .code-example pre {
  background: #0f172a;
}

/* Toast */
.timestamp-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--time-light-text);
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--time-shadow);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timestamp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsivo */
@media (max-width: 768px) {
  .codetude-timestamp-converter {
    padding: 15px;
  }

  .timestamp-section {
    padding: 20px;
  }

  .datetime-inputs,
  .calc-row {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .diff-display {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    width: 100%;
  }
}
