/* UTM Builder - Complete Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f3f4f6;
  color: #111827;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  padding: 40px 0;
  line-height: 1.6;
}

.ad-banner-top {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 15px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#ad-top-banner {
  width: 728px;
  height: 90px;
}

.ad-placeholder {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
}

.nav {
  margin-bottom: 24px;
  margin-top: 24px;
}

.nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav a:hover {
  color: #111827;
}

.header {
  text-align: center;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #111827;
}

.header p {
  color: #4b5563;
  margin-top: 8px;
  font-size: 0.98rem;
}

.subtitle {
  color: #4b5563;
  margin-top: 8px;
  font-size: 0.98rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5f2ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.logo-wordmark {
  font-weight: 700;
  letter-spacing: -0.06em;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  gap: 4px;
  max-width: 1400px;
  margin: 0 auto 8px auto;
}

.tab {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.16s ease;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.tab:hover {
  color: #111827;
  background: #f9fafb;
}

.tab.active {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
  background: #eff6ff;
}

.main-content-wrapper {
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 30px;
}

@media (max-width: 1100px) {
  .main-content-wrapper {
    flex-direction: column;
  }

  .ad-sidebar {
    display: none;
  }
}

.content {
  flex: 1 1 auto;
  min-width: 0;
}

#generator {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 28px 28px 30px;
  margin-top: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: #111827;
  font-size: 0.9em;
}

.required {
  color: #dc2626;
}

.optional {
  color: #6b7280;
  font-weight: 400;
  font-size: 0.8em;
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95em;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
  background: #ffffff;
  color: #111827;
}

input[type="text"]::placeholder,
input[type="url"]::placeholder {
  color: #9ca3af;
}

input[type="text"]:focus,
input[type="url"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
  background: #ffffff;
}

.help-text {
  font-size: 0.8em;
  color: #6b7280;
  margin-top: 4px;
}

.ad-in-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 15px;
  margin: 24px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#ad-in-content-banner {
  width: 300px;
  height: 250px;
}

.generated-url-section {
  margin-top: 20px;
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.generated-url-section h3 {
  margin-bottom: 12px;
  color: #111827;
  font-size: 1.05em;
  font-weight: 500;
}

.url-display {
  background: #ffffff;
  padding: 12px;
  border-radius: 6px;
  word-break: break-all;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.85em;
  color: #111827;
  border: 1px solid #d1d5db;
  min-height: 50px;
}

.url-display.empty {
  color: #9ca3af;
  font-style: italic;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  flex: 1;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  flex: 0 0 auto;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Guide Tab Styles */
.guide-content {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 32px;
  margin-top: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.info-section {
  margin-bottom: 32px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111827;
}

.info-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111827;
  margin-top: 24px;
}

.info-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
  color: #111827;
}

.info-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 12px;
}

.info-section ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.info-section ul li {
  padding-left: 24px;
  margin-bottom: 10px;
  position: relative;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
}

.info-section ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #059669;
  font-weight: 600;
}

.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: #1e40af;
}

.info-box p {
  color: #1e40af;
}

/* Sidebar Ad */
.ad-sidebar {
  flex: 0 0 160px;
}

.ad-sidebar-sticky {
  position: sticky;
  top: 24px;
}

#ad-sidebar-banner {
  width: 160px;
  height: 600px;
}

/* Success Message Toast */
.success-message {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #059669;
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.4);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ad-banner-bottom {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 20px;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
}