/* Artify Tools — YouTube Toolkit */

:root {
  --bg: #090d0b;
  --surface: #111814;
  --surface-light: #18221b;
  --border: #28372c;
  --text: #f4f8f4;
  --muted: #9eaca1;
  --green: #a3ff12;
  --green-dark: #75c900;
  --danger: #ff6565;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(104, 170, 43, 0.10), transparent 48%),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Header */

.site-header {
  width: 100%;
  min-height: 76px;
  padding: 18px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(163, 255, 18, 0.12);
  background: rgba(9, 13, 11, 0.88);
}

.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.brand span,
.hero h1 span {
  color: var(--green);
}

.back-link {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--green);
}

/* Main layout */

.container {
  width: min(920px, 92%);
  margin: 0 auto;
  padding: 48px 0 60px;
}

.hero {
  text-align: center;
  margin-bottom: 34px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 15px;
  color: var(--green);
  background: rgba(163, 255, 18, 0.08);
  border: 1px solid rgba(163, 255, 18, 0.23);
  border-radius: 30px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.2;
  letter-spacing: -1.6px;
  margin-bottom: 12px;
}

.hero p {
  max-width: 530px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
}

/* Tool card */

.tool-card {
  padding: 28px;
  background: linear-gradient(145deg, #131b15, #0e140f);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  margin-bottom: 28px;
  background: #090e0b;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tab {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: #10150b;
  background: var(--green);
}

/* URL input */

.input-label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.input-row input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 15px;
  color: var(--text);
  background: #080d0a;
  border: 1px solid #304033;
  border-radius: 10px;
  outline: none;
}

.input-row input::placeholder {
  color: #718075;
}

.input-row input:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(163, 255, 18, 0.07);
}

/* Buttons */

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #10150b;
  background: var(--green);
  border: 1px solid var(--green);
}

.primary-button:hover {
  background: #b7ff4d;
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.secondary-button {
  color: var(--green);
  background: rgba(163, 255, 18, 0.07);
  border: 1px solid rgba(163, 255, 18, 0.3);
}

.secondary-button:hover {
  background: rgba(163, 255, 18, 0.13);
}

.status {
  min-height: 25px;
  margin: 13px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--green);
}

/* Result area */

.result-panel {
  margin-top: 12px;
}

.empty-state {
  min-height: 245px;
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(5, 9, 6, 0.5);
  border: 1px dashed #344437;
  border-radius: 15px;
}

.empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  color: var(--green);
  background: rgba(163, 255, 18, 0.09);
  border: 1px solid rgba(163, 255, 18, 0.19);
  border-radius: 18px;
  font-size: 27px;
}

.empty-state h2 {
  margin-bottom: 7px;
  font-size: 19px;
}

.empty-state p {
  color: var(--muted);
  font-size: 13px;
}

.thumbnail-result h2,
.info-panel h2 {
  margin-bottom: 17px;
  font-size: 21px;
}

.preview-card {
  overflow: hidden;
  background: #080d0a;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.preview-card img {
  display: block;
  width: 100%;
  max-height: 440px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background:
    linear-gradient(45deg, #172019 25%, transparent 25%),
    linear-gradient(-45deg, #172019 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #172019 75%),
    linear-gradient(-45deg, transparent 75%, #172019 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.preview-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.preview-info span {
  color: var(--muted);
  font-size: 13px;
}

.download-button {
  min-height: 42px;
  padding: 9px 14px;
}

/* Resolution options */

.resolution-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.resolution-button {
  min-height: 42px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.resolution-button:hover,
.resolution-button.active {
  color: var(--green);
  border-color: var(--green-dark);
  background: rgba(163, 255, 18, 0.06);
}

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* Video info */

.info-panel {
  padding: 22px;
  background: #0a100c;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.info-panel p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* Instructions */

.notice {
  margin-top: 25px;
  padding: 24px;
  background: rgba(17, 24, 20, 0.65);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.notice h2 {
  margin-bottom: 13px;
  font-size: 19px;
}

.notice ol {
  padding-left: 22px;
  color: #c6d0c8;
  font-size: 14px;
}

.notice li {
  margin-bottom: 7px;
  padding-left: 3px;
}

.notice p {
  margin-top: 17px;
  padding-top: 15px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

/* Footer */

.site-footer {
  padding: 22px 15px;
  color: #829086;
  border-top: 1px solid rgba(163, 255, 18, 0.1);
  text-align: center;
  font-size: 12px;
}

/* Responsive design */

@media (max-width: 650px) {
  .site-header {
    min-height: 65px;
    padding: 14px 5%;
  }

  .brand {
    font-size: 20px;
  }

  .container {
    width: 92%;
    padding-top: 32px;
  }

  .hero {
    margin-bottom: 25px;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .tool-card {
    padding: 17px;
    border-radius: 15px;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row input,
  .input-row .primary-button {
    width: 100%;
  }

  .resolution-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-info {
    align-items: stretch;
    flex-direction: column;
  }

  .download-button {
    width: 100%;
  }

  .notice {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}