/* TopWallpaperSite image tools theme. */
:root {
  --wt-primary: #0f766e;
  --wt-primary-dark: #115e59;
  --wt-accent: #14b8a6;
  --wt-body-bg: #f9fafb;
  --wt-card-bg: #ffffff;
  --wt-card-border: #e5e7eb;
  --wt-text: #111827;
  --wt-text-muted: #6b7280;
  --wt-footer-bg: #ffffff;
  --wt-footer-text: #6b7280;
  --wt-shadow-sm: 0 1px 3px rgba(17, 24, 39, .08);
  --wt-shadow-md: 0 12px 30px rgba(17, 24, 39, .12);
  --wt-radius: .75rem;
  --wt-radius-sm: .5rem;
  --wt-transition: all .22s ease;
}

[data-bs-theme="dark"] {
  --wt-body-bg: #111827;
  --wt-card-bg: #1f2937;
  --wt-card-border: #374151;
  --wt-text: #f9fafb;
  --wt-text-muted: #d1d5db;
  --wt-footer-bg: #111827;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--wt-body-bg);
  color: var(--wt-text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

main { flex: 1 0 auto; }

a {
  color: var(--wt-primary);
  text-decoration: none;
}

a:hover {
  color: var(--wt-primary-dark);
  text-decoration: underline;
}

.tws-navbar {
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
  padding-top: .55rem;
  padding-bottom: .55rem;
}

.tws-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: #111827 !important;
  font-size: 1.05rem;
  font-weight: 800;
}

.tws-brand img {
  width: 48px;
  height: 48px;
  border-radius: .65rem;
  object-fit: cover;
}

.tws-navbar .navbar-toggler {
  background: #f3f4f6;
}

.tws-navbar .navbar-toggler-icon {
  filter: invert(35%);
}

.tws-navbar .nav-link {
  color: #4b5563 !important;
  font-weight: 600;
  border-radius: 999px;
  padding: .45rem .85rem !important;
}

.tws-navbar .nav-link:hover,
.tws-navbar .nav-link.active {
  color: #111827 !important;
  background: #f3f4f6;
}

.wt-dropdown {
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius);
  background: var(--wt-card-bg);
  box-shadow: var(--wt-shadow-md);
  overflow: hidden;
}

.wt-dropdown .dropdown-item {
  color: var(--wt-text);
  padding: .6rem 1rem;
  font-size: .92rem;
}

.wt-dropdown .dropdown-item:hover {
  color: var(--wt-primary);
  background: #f0fdfa;
}

.wt-theme-btn {
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wt-hero {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, .10), rgba(255, 255, 255, 0)),
    var(--wt-body-bg);
  border-bottom: 1px solid #eef2f7;
}

.text-teal { color: var(--wt-primary); }

.tws-badge {
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
}

.wt-tool-card,
.wt-panel,
.card {
  background: var(--wt-card-bg);
  border-radius: var(--wt-radius) !important;
  border: 1px solid var(--wt-card-border) !important;
  box-shadow: var(--wt-shadow-sm) !important;
}

.wt-tool-card {
  height: 100%;
  transition: var(--wt-transition);
}

.wt-tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wt-shadow-md) !important;
}

.wt-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--wt-primary);
  background: #f0fdfa;
  border-radius: var(--wt-radius-sm);
}

.wt-btn-primary,
.btn-primary {
  background: var(--wt-primary);
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .20);
}

.wt-btn-primary:hover,
.btn-primary:hover {
  background: var(--wt-primary-dark);
  color: #fff !important;
}

.btn-success {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.bg-success {
  background-color: var(--wt-primary) !important;
}

.text-primary {
  color: var(--wt-primary) !important;
}

.text-bg-primary {
  background-color: var(--wt-primary) !important;
}

.progress-bar.bg-primary {
  background-color: var(--wt-primary) !important;
}

.spinner-border.text-primary {
  color: var(--wt-primary) !important;
}

.breadcrumb {
  --bs-breadcrumb-divider-color: #9ca3af;
  color: var(--wt-text-muted);
}

.breadcrumb a {
  color: var(--wt-text-muted);
}

.wt-dropzone {
  border: 2px dashed #99f6e4;
  border-radius: var(--wt-radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #f0fdfa;
  transition: var(--wt-transition);
  position: relative;
}

.wt-dropzone:hover,
.wt-dropzone.dragover {
  background: #ccfbf1;
  border-color: var(--wt-primary);
}

.wt-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.form-label {
  color: var(--wt-text);
}

.form-control,
.form-select {
  color: var(--wt-text);
  background-color: #fff;
  border: 1.5px solid var(--wt-card-border);
  border-radius: .75rem;
}

.form-control:focus,
.form-select:focus {
  color: var(--wt-text);
  background-color: #fff;
  border-color: var(--wt-accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18);
}

.wt-image-preview,
.wt-canvas {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--wt-radius-sm);
  border: 1px solid var(--wt-card-border);
  box-shadow: var(--wt-shadow-sm);
  background: #fff;
}

.wt-stat {
  background: var(--wt-body-bg);
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius-sm);
  padding: 1rem;
}

.wt-output {
  min-height: 220px;
  font-family: Consolas, "Liberation Mono", monospace;
}

.wt-footer {
  background: var(--wt-footer-bg);
  color: var(--wt-footer-text);
  border-top: 1px solid #f3f4f6;
}

.wt-footer-brand {
  color: var(--wt-text);
  font-size: 1.15rem;
  font-weight: 800;
}

.wt-footer a {
  color: var(--wt-footer-text);
}

.text-muted { color: var(--wt-text-muted) !important; }

@media (max-width: 576px) {
  .wt-hero .display-5 { font-size: 2rem; }
  .tws-brand span { font-size: .95rem; }
  .tws-brand img {
    width: 42px;
    height: 42px;
  }
}
