/* === RentalClinic Portfolio Showcase === */
:root {
  --bg: #030712;
  --bg-card: #0a1120;
  --bg-elevated: #111827;
  --fg: #f1f5f9;
  --fg-muted: #64748b;
  --fg-dim: #334155;
  --border: #1e293b;
  --accent: #3b82f6;
  --accent-dim: rgba(59,130,246,0.12);
  --success: #22c55e;
  --success-dim: rgba(34,197,94,0.12);
  --warning: #eab308;
  --danger: #ef4444;
  --purple: #a855f7;
  --purple-dim: rgba(168,85,247,0.12);
  --orange: #f97316;
  --orange-dim: rgba(249,115,22,0.12);
  --radius: 1rem;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === Back Link === */
.back-link {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: rgba(3,7,18,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 2rem;
  transition: all 0.3s;
}
.back-link:hover {
  color: var(--fg);
  border-color: var(--accent);
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 4rem 2rem;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 30% 20%, rgba(59,130,246,0.08), transparent),
    radial-gradient(ellipse 500px 300px at 70% 60%, rgba(168,85,247,0.06), transparent);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.hero-title span { color: var(--accent); }
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--fg-muted);
  font-weight: 300;
  margin-bottom: 1rem;
}
.hero-desc {
  font-size: 1rem;
  color: var(--fg-dim);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.tag {
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--fg-muted);
}

/* === Info Section === */
.info-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.info-card {
  text-align: center;
}
.info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

/* === Showcase Sections === */
.showcase {
  padding: 6rem 0;
}
.showcase.dark {
  background: var(--bg-card);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.5rem 0;
}
.section-header p {
  color: var(--fg-muted);
  font-size: 1rem;
}

/* === Mock Browser === */
.mock-browser {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.browser-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }
.browser-url {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: var(--bg);
  padding: 0.35rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}
.browser-content {
  padding: 1.5rem;
}

/* === Dashboard Mock === */
.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.mock-logo {
  font-size: 1.2rem;
  font-weight: 700;
}
.mock-logo span { color: var(--accent); }
.mock-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--fg-muted);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* KPI Row */
.mock-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.mock-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}
.kpi-icon {
  width: 36px; height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.kpi-icon.blue { background: var(--accent-dim); }
.kpi-icon.green { background: var(--success-dim); }
.kpi-icon.purple { background: var(--purple-dim); }
.kpi-icon.orange { background: var(--orange-dim); }
.kpi-data {
  display: flex;
  flex-direction: column;
}
.kpi-num {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kpi-label {
  font-size: 0.65rem;
  color: var(--fg-muted);
}
.kpi-change {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
}
.kpi-change.up { color: var(--success); }
.kpi-change.down { color: var(--danger); }

/* Chart Area */
.mock-chart-area {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
}
.mock-chart-main, .mock-chart-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.chart-title {
  font-size: 0.85rem;
  font-weight: 600;
}
.chart-tabs {
  display: flex;
  gap: 0.25rem;
}
.chart-tabs .tab {
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  color: var(--fg-muted);
  cursor: default;
}
.chart-tabs .tab.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.chart-body {
  height: 160px;
}
.line-chart {
  width: 100%;
  height: 100%;
}

/* Top Videos */
.top-videos {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.video-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
}
.rank {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  width: 18px;
  text-align: center;
}
.video-thumb {
  width: 48px;
  height: 28px;
  background: var(--bg-elevated);
  border-radius: 4px;
  flex-shrink: 0;
}
.video-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.video-title {
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-views {
  font-size: 0.62rem;
  color: var(--fg-muted);
}

/* === Analyze Mock === */
.analyze-layout {
  display: flex;
  min-height: 500px;
}
.analyze-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1rem;
}
.sidebar-logo {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.menu-item {
  font-size: 0.78rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--fg-muted);
  cursor: default;
}
.menu-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.analyze-content {
  flex: 1;
  padding: 1.5rem;
  min-width: 0;
}
.analyze-header {
  margin-bottom: 1.5rem;
}
.analyze-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.analyze-search input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--fg);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
}

/* Analysis Grid */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.analysis-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.analysis-card.wide {
  grid-column: 1 / -1;
}
.analysis-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.analysis-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.analysis-card p {
  font-size: 0.75rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Mini Stats */
.mini-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.mini-stat {
  display: flex;
  flex-direction: column;
}
.stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.62rem;
  color: var(--fg-muted);
}

/* Rec List */
.rec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rec-list li {
  font-size: 0.75rem;
  color: var(--fg-muted);
  padding-left: 1rem;
  position: relative;
}
.rec-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Script Preview */
.script-preview {
  margin-top: 0.75rem;
}
.lang-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.lang {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  color: var(--fg-muted);
  cursor: default;
}
.lang.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.script-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--fg-muted);
}
.script-text .timestamp {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
.script-text .timestamp:first-child {
  margin-top: 0;
}

/* === Stats Mock === */
.stats-mock {
  padding: 1.5rem;
}
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.stats-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
.period-tabs {
  display: flex;
  gap: 0.25rem;
}
.ptab {
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  border-radius: 0.4rem;
  color: var(--fg-muted);
  cursor: default;
}
.ptab.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Stats Table */
.stats-table {
  margin-bottom: 1.5rem;
}
.table-header {
  display: grid;
  grid-template-columns: 50px 1fr 80px 80px 70px 60px;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table-row {
  display: grid;
  grid-template-columns: 50px 1fr 80px 80px 70px 60px;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(30,41,59,0.5);
  align-items: center;
  font-size: 0.8rem;
}
.row-thumb {
  width: 44px;
  height: 26px;
  background: var(--bg-elevated);
  border-radius: 4px;
}
.row-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-rate {
  font-weight: 600;
}
.row-rate.good { color: var(--success); }
.row-rate.ok { color: var(--warning); }
.row-rate.bad { color: var(--danger); }
.row-subs { color: var(--success); font-weight: 500; }

/* Stats Summary */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}
.summary-item {
  text-align: center;
}
.sum-label {
  display: block;
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-bottom: 0.3rem;
}
.sum-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

/* === Features Section === */
.features-section {
  padding: 6rem 0;
  background: var(--bg-card);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* === Tech Section === */
.tech-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}
.tech-inner {
  text-align: center;
}
.tech-inner h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.tech {
  font-size: 0.8rem;
  padding: 0.5rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--fg-muted);
  transition: all 0.3s;
}
.tech:hover {
  border-color: var(--accent);
  color: var(--fg);
}

/* === Footer === */
.footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer p {
  font-size: 0.78rem;
  color: var(--fg-dim);
  margin-bottom: 0.25rem;
}
.footer-back {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.footer-back:hover {
  text-decoration: underline;
}

/* === Animations === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .mock-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .mock-chart-area {
    grid-template-columns: 1fr;
  }
  .analyze-layout {
    flex-direction: column;
  }
  .analyze-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .table-header,
  .table-row {
    grid-template-columns: 40px 1fr 60px 60px;
  }
  .col-watch, .col-subs,
  .row-watch, .row-subs {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .stats-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .back-link {
    top: 1rem;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .mock-kpi-row {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .browser-content {
    padding: 1rem;
  }
}
