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

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #E9EAEC;
  color: #6B7280;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeIn 0.5s ease-out;
}

.header h1 {
  font-size: 48px;
  background: #E9EAEC;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.subtitle {
  color: #9CA3AF;
  font-size: 14px;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.date-picker {
  display: flex;
  gap: 15px;
  align-items: center;
}

.date-picker label {
  font-size: 14px;
  color: #9CA3AF;
}

.date-picker input {
  padding: 8px 12px;
  border: 1px solid #CCCCCC;
  border-radius: 8px;
  background: #F2F3F5;
  color: #6B7280;
  font-size: 14px;
}

.btn-primary {
  padding: 10px 24px;
  background: #E9EAEC;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(80, 82, 171, 0.4);
}

.stats {
  font-size: 13px;
  color: #9CA3AF;
}

.campaigns-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.6s ease-out;
}

/* === CAMPAIGN BLOCK === */
.campaign-wrap {
  font-family: 'Roboto', Arial, sans-serif;
  color: #6B7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.campaign-bar {
  position: relative;
  width: 1200px;
  height: 36px;
  margin: 0 auto;
  background: #FAF7F7;
  border: 1px solid #CCCCCC;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-right: 8px;
  z-index: 2;
  transition: all 0.3s ease;
}

.campaign-bar:hover {
  border-color: #5F82C7;
}

.campaign-plus {
  width: 20px;
  height: 20px;
  margin-left: 8px;
  border-radius: 50%;
  background: #8A909B;
  color: #FAF7F7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  user-select: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.campaign-plus:hover {
  transform: scale(1.1);
}

.campaign-title {
  margin-left: 13px;
  font-size: 14px;
  font-weight: 700;
  color: #6B7280;
  line-height: 20px;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-meta {
  margin-left: 20px;
  font-size: 14px;
  color: #6B7280;
  line-height: 20px;
  letter-spacing: .3px;
  white-space: nowrap;
}

.campaign-meta .inactive {
  color: #FF99BD;
}

.campaign-bead {
  flex-shrink: 0;
}

.drop {
  display: none;
  background: #FAF7F7;
  width: 1160px;
  margin: 0 auto;
  box-sizing: border-box;
  padding-bottom: 0;
  margin-top: -1px;
}

.drop.open {
  display: block;
}

/* === CREATIVE BLOCK === */
.creative-wrap {
  position: relative;
  width: 1160px;
  height: 110px;
  background: #F5F2F2;
  border: 1px solid #CCCCCC;
  box-sizing: border-box;
  border-radius: 0;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.creative-wrap:hover {
  background: #EDE9E9;
}

.drop > .creative-wrap:last-child {
  border-radius: 0 0 8px 8px;
}

.drop > .creative-wrap:not(:first-child) {
  margin-top: -1px;
}

.drop > .creative-wrap:first-child {
  border-top: none;
  margin-top: -1px;
}

.creative-row {
  position: relative;
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.creative-cbx {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid #9CA3AF;
  background: transparent;
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
}

.creative-cbx:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 7px;
  height: 11px;
  border-right: 2px solid #6B7280;
  border-bottom: 2px solid #6B7280;
  transform: rotate(40deg);
}

.creative-play {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8A909B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin-left: 0;
  flex-shrink: 0;
}

.creative-play:hover {
  transform: scale(1.1);
}

.creative-play svg {
  width: 10px;
  height: 10px;
}

.creative-thumb {
  width: 70px;
  height: 70px;
  border: 1px solid #9CA3AF;
  object-fit: cover;
  background: #F2F3F5;
  cursor: pointer;
  transition: border-color 0.2s ease;
  margin-left: 9px;
  flex-shrink: 0;
}

.creative-thumb:hover {
  border-color: #5F82C7;
}

.creative-title {
  font-size: 14px;
  color: #6B7280;
  margin-left: 11px;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.creative-metrics {
  font-size: 12px;
  color: #6B7280;
  font-family: 'Roboto', Arial, sans-serif;
  margin-left: 20px;
  flex-grow: 1;
}

.creative-metrics b {
  color: #6B7280;
}

.creative-ke-label {
  font-size: 14px;
  font-weight: 700;
  margin-right: 5px;
  flex-shrink: 0;
}

.creative-ke-badge {
  flex-shrink: 0;
}

/* === TEXT ANALYSIS BLOCK === */
.text-analysis-wrap {
  background: #F2F3F5;
  border: 1px solid #CCCCCC;
  border-top: none;
  width: 1160px;
  box-sizing: border-box;
  margin: 0 auto;
  margin-top: -1px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.text-analysis {
  max-width: 960px;
  line-height: 1.5;
  font-size: 14px;
  color: #6B7280;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

.text-analysis h3 {
  font-size: 19px;
  font-weight: 400;
  color: #5F82C7;
  margin: 0 0 12px 0;
}

.ta-section {
  margin: 10px 0 0 0;
}

.text-analysis .muted {
  color: #5F82C7;
  font-size: 14px;
  font-weight: 400;
}

.ta-metrics-grid {
  margin-top: 10px;
}

.more-btn {
  width: 145px;
  height: 30px;
  border-radius: 28px;
  background: #5F82C7;
  color: #6B7280;
  font-size: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background .2s ease;
  margin: 20px auto 0 auto;
}

.more-btn:hover {
  background: #4A6BA8;
}

/* === ANALYSIS TABLES === */
.analysis-tables {
  width: 1160px;
  margin: 0 auto;
  margin-top: -1px;
}

/* === LOADING === */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1000;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: #5F82C7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.hidden {
  display: none;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}