/**
 * Tweet to Image Converter Stylesheet - PicDriver
 * Modern dark UI with X / Twitter aesthetics and responsive layouts
 */

:root {
  --tw-blue: #1d9bf0;
  --tw-dim: #15202b;
  --tw-dark: #000000;
  --tw-border: rgba(255, 255, 255, 0.12);
  --tw-gray: #71767b;
}

/* ═══════════════ GLOBAL SUITE HEADER & NAVIGATION ═══════════════ */
.site-header {
  background-color: #05070a;
  border-bottom: 1px solid var(--tw-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  width: 100%;
}

.header-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #f8fafc;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--tw-blue), #0072ff);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(29, 155, 240, 0.25);
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-name span {
  color: var(--tw-blue);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--tw-blue);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Tool Hero Section */
.tool-hero-section {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: radial-gradient(circle at 50% 20%, rgba(29, 155, 240, 0.15) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(29, 155, 240, 0.12);
  color: var(--tw-blue);
  border: 1px solid rgba(29, 155, 240, 0.3);
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tw-blue);
  box-shadow: 0 0 10px var(--tw-blue);
  animation: pulseGlow 1.8s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary, #94a3b8);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Stage Section */
.tweet-stage-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Studio Grid */
.tweet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.tweet-stage-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Viewport Card */
.tweet-viewport-card {
  background: var(--surface, #0f172a);
  border: 1px solid var(--tw-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.tweet-viewport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.tweet-status-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-badge.accent {
  background: rgba(29, 155, 240, 0.15);
  color: var(--tw-blue);
  border-color: rgba(29, 155, 240, 0.3);
}

.hud-badge.magenta {
  background: rgba(221, 36, 118, 0.15);
  color: #f43f5e;
  border-color: rgba(221, 36, 118, 0.3);
}

.tweet-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Canvas Viewport */
.tweet-canvas-container {
  width: 100%;
  min-height: 480px;
  background: repeating-conic-gradient(#090d16 0% 25%, #131b2e 0% 50%) 50% / 24px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tweet-canvas-container canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* Controls Panel */
.tool-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-card {
  background: var(--surface, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
}

.control-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.control-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

/* Preset Buttons */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.2s ease;
  color: var(--text-primary, #ffffff);
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(29, 155, 240, 0.4);
}

.preset-btn.active {
  background: rgba(29, 155, 240, 0.15);
  border-color: var(--tw-blue);
  color: #ffffff;
}

.preset-btn-sub {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
}

/* Form Groups & Sliders */
.form-group {
  margin-bottom: 1.1rem;
}

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

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 0.5rem;
}

.form-value-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--tw-blue);
  background: rgba(29, 155, 240, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.text-input, .textarea-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  color: #ffffff;
  font-family: inherit;
  transition: border-color 0.2s;
}

.text-input:focus, .textarea-input:focus {
  outline: none;
  border-color: var(--tw-blue);
  box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.2);
}

.textarea-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.slider-input {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tw-blue);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(29, 155, 240, 0.6);
  transition: transform 0.1s;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Badge & Toggle Button Rows */
.badge-row, .backdrop-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toggle-btn, .backdrop-btn {
  flex: 1 1 calc(50% - 0.5rem);
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.toggle-btn:hover, .backdrop-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.toggle-btn.active, .backdrop-btn.active {
  background: rgba(29, 155, 240, 0.18);
  border-color: var(--tw-blue);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(29, 155, 240, 0.25);
}

/* Metrics Form Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* Export Card */
.export-card {
  background: linear-gradient(145deg, #0d1527, #090d18);
  border: 1px solid rgba(29, 155, 240, 0.25);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.btn-download-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.25rem;
  background: linear-gradient(135deg, #1d9bf0, #0072ff);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(29, 155, 240, 0.35);
  transition: all 0.2s ease;
  margin-bottom: 0.75rem;
}

.btn-download-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(29, 155, 240, 0.5);
}

.export-sub-row {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.btn-download-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-download-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .tweet-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .tweet-viewport-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .preset-grid {
    grid-template-columns: 1fr;
  }
  .export-sub-row {
    flex-direction: column;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════ SEO GUIDE & FOOTER ═══════════════ */
.tool-seo-guide {
  background: var(--surface, #0f172a);
  border: 1px solid var(--tw-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin: 3rem auto;
  max-width: 1080px;
  color: #cbd5e1;
}

.tool-seo-guide h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.tool-seo-guide h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 1.75rem 0 0.75rem;
}

.tool-seo-guide p {
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.tool-seo-guide ul {
  padding-left: 1.5rem;
  line-height: 1.7;
}

.tool-seo-guide li {
  margin-bottom: 0.5rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.table-responsive th {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--tw-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-responsive td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.table-responsive td strong {
  color: #ffffff;
}

.site-footer {
  background-color: #05070a;
  border-top: 1px solid var(--tw-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
  margin-top: auto;
  width: 100%;
}

