:root {
  --yt-primary: #ff0000;
  --yt-secondary: #cc0000;
  --yt-grad: linear-gradient(135deg, #ff0000, #ff4d4d);
  --yt-glow: 0 0 20px rgba(255, 0, 0, 0.25);
}

.yt-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.yt-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .yt-input-group {
    grid-template-columns: 1fr;
  }
}

.yt-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yt-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--t2);
}

.yt-field input, .yt-field select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--t);
  font-size: 0.9rem;
  transition: all 0.3s;
  outline: none;
  font-family: inherit;
}

.yt-field input:focus, .yt-field select:focus {
  border-color: var(--yt-primary);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.15);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.slider-container input[type="range"] {
  flex: 1;
  accent-color: var(--yt-primary);
}

.slider-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--t);
  min-width: 25px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  width: 18px;
  height: 18px;
  accent-color: var(--yt-primary);
  cursor: pointer;
}

/* Outputs & Analytics Cards */
.output-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variation-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.variation-card:hover {
  border-color: rgba(255, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.025);
}

.variation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.variation-type {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--yt-primary);
  letter-spacing: 0.05em;
}

.variation-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--t2);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.action-btn:hover {
  color: var(--t);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.star-btn:hover, .action-btn.star-btn.starred {
  color: #ffb703;
  border-color: rgba(255, 183, 3, 0.4);
  background: rgba(255, 183, 3, 0.08);
}

.youtube-title-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 0, 0, 0.04);
  border: 1px solid rgba(255, 0, 0, 0.15);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.youtube-title-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--t);
  word-break: break-word;
  flex: 1;
}

.variation-text {
  font-size: 0.9rem;
  color: var(--t);
  line-height: 1.6;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Analytics Accordions */
.analytics-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--t2);
  user-select: none;
  transition: all 0.3s;
}

.analytics-toggle:hover {
  color: var(--t);
  background: rgba(255, 255, 255, 0.04);
}

.analytics-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.analytics-content {
  padding: 15px 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .analytics-content {
    grid-template-columns: 1fr;
  }
}

.metric-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.metric-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t2);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  border-radius: 10px;
  width: 0%;
  transition: width 1s ease-out;
}

.fill-high { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-mid { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fill-low { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Tab panel styles */
.tabs-header {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--t2);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--t);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: #fff;
  background: var(--yt-grad);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.tab-panel {
  display: none;
}

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

/* Export dropdown */
.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-menu {
  position: absolute;
  right: 0;
  top: 36px;
  background: #111122;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  min-width: 140px;
  overflow: hidden;
}

.export-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--t2);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.export-menu a:hover {
  color: var(--t);
  background: rgba(255, 255, 255, 0.05);
}

.export-dropdown:hover .export-menu {
  display: block;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--t2);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 250px;
  margin: 0 auto;
}
