/* ═══════════════════════════════════════════════
   ShoeAI — Custom Stylesheet
   ═══════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg:          #0d0f14;
  --bg-card:     #161922;
  --bg-card-alt: #1e2230;
  --border:      #2a2f3f;
  --accent:      #6c63ff;
  --accent-soft: rgba(108, 99, 255, 0.15);
  --accent2:     #00d4aa;
  --text:        #e8eaf0;
  --text-muted:  #8892aa;
  --danger:      #ff5757;
  --warning:     #ffd166;
  --success:     #06d6a0;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --radius:       14px;
  --radius-sm:    8px;
  --shadow:       0 4px 32px rgba(0,0,0,0.4);
}

/* ── RESET / BASE ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════ */
.navbar {
  background: rgba(13, 15, 20, 0.92) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text) !important;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.4rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text) !important;
  background: var(--accent-soft);
}

.btn-predict {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
}
.btn-predict:hover,
.btn-predict.active {
  background: #5851e6 !important;
  color: #fff !important;
}

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */
.btn-primary-custom {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  transition: all .2s;
}
.btn-primary-custom:hover {
  background: #5851e6;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,99,255,0.35);
}
.btn-primary-custom:disabled {
  background: var(--border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline-custom {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  transition: all .2s;
}
.btn-outline-custom:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.btn-outline-custom:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════ */
.page-header {
  background: linear-gradient(135deg, var(--bg-card) 0%, #111620 100%);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════ */
.hero-section {
  background: radial-gradient(ellipse at 70% 40%, rgba(108,99,255,0.12) 0%, transparent 70%),
              var(--bg);
  padding: 2rem 0;
}

.min-vh-80 { min-height: 80vh; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(108,99,255,0.3);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 600;
  padding: .35rem .9rem;
  border-radius: 99px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
}

/* ── Hero Visual ── */
.hero-visual {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}

.hero-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 160px; height: 160px;
  background: var(--accent-soft);
  border: 2px solid rgba(108,99,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  animation: pulse 3s ease-in-out infinite;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: var(--shadow);
}
.floating-card i { font-size: 1.4rem; color: var(--accent); }

.card-1 { top: 10px; left: 0; animation: float1 4s ease-in-out infinite; }
.card-2 { bottom: 40px; left: 20px; animation: float2 4.5s ease-in-out infinite; }
.card-3 { top: 50px; right: 0; animation: float3 5s ease-in-out infinite; }

@keyframes float1 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes float2 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(10px)} }
@keyframes float3 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes pulse  { 0%,100%{transform:translate(-50%,-50%) scale(1)} 50%{transform:translate(-50%,-50%) scale(1.05)} }

/* ════════════════════════════════════════════
   STATS
   ════════════════════════════════════════════ */
.stats-section { border-top: 1px solid var(--border); }

.stat-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.stat-card:hover { border-color: var(--accent); }

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .35rem;
}

/* ════════════════════════════════════════════
   SECTIONS
   ════════════════════════════════════════════ */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}
.section-subtitle { color: var(--text-muted); }

/* ════════════════════════════════════════════
   CLASS CARDS
   ════════════════════════════════════════════ */
.class-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all .3s;
}
.class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.boot-card:hover   { border-color: #6c63ff; }
.sandal-card:hover { border-color: #00d4aa; }
.shoe-card:hover   { border-color: #ffd166; }

.class-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.class-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}
.class-card p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ════════════════════════════════════════════
   STEPS
   ════════════════════════════════════════════ */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color .2s;
  position: relative;
}
.step-card:hover { border-color: var(--accent); }

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: .5rem;
  border: 2px solid rgba(108,99,255,0.2);
  display: inline-block;
  width: 64px; height: 64px;
  line-height: 60px;
  text-align: center;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--accent);
}

.step-icon { font-size: 1.6rem; color: var(--text-muted); margin: .75rem 0; }
.step-card h4 { font-family: var(--font-display); font-weight: 700; color: var(--text); }
.step-card p  { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ════════════════════════════════════════════
   CTA
   ════════════════════════════════════════════ */
.cta-box {
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(0,212,170,0.1) 100%);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 20px;
  padding: 3.5rem 2rem;
}
.cta-box h2 { font-family: var(--font-display); font-weight: 700; }

/* ════════════════════════════════════════════
   UPLOAD / PREDICT PAGE
   ════════════════════════════════════════════ */
.upload-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-icon    { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.drop-title   { font-family: var(--font-display); font-weight: 700; color: var(--text); }
.drop-sub     { color: var(--text-muted); margin-bottom: .5rem; }
.drop-format  { font-size: .8rem; color: var(--text-muted); }

.drop-zone-inner { width: 100%; }

/* ── Preview ── */
.preview-img {
  max-height: 280px;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.preview-info { color: var(--text-muted); font-size: .9rem; }

/* ── Loading ── */
.loading-spinner { position: relative; display: inline-block; }
.spinner-ring {
  width: 56px; height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tips Card ── */
.tips-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.tips-list {
  list-style: none;
  padding: 0;
  color: var(--text-muted);
}
.tips-list li::before { content: "→ "; color: var(--accent); font-weight: 700; }
.tips-list li { margin-bottom: .4rem; }

/* ════════════════════════════════════════════
   RESULT PAGE
   ════════════════════════════════════════════ */
.result-image-card,
.prediction-card,
.scores-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.result-image-header,
.prediction-header,
.scores-header {
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.25rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-muted);
}

.result-image-body { padding: 1.25rem; text-align: center; }
.result-img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.prediction-body { padding: 1.5rem; }

.prediction-class {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.class-emoji { font-size: 3rem; }
.class-label { color: var(--text-muted); font-size: .85rem; }
.class-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

/* Confidence Bar */
.confidence-bar-bg {
  background: var(--bg-card-alt);
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
}
.confidence-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1s;
}
.fill-high   { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.fill-medium { background: linear-gradient(90deg, var(--warning), #ff9f43); }
.fill-low    { background: var(--danger); }

.confidence-badge {
  font-size: .85rem;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 99px;
}
.badge-high   { background: rgba(6,214,160,0.15); color: var(--success); }
.badge-medium { background: rgba(255,209,102,0.15); color: var(--warning); }
.badge-low    { background: rgba(255,87,87,0.15);  color: var(--danger); }

.confidence-note { font-size: .85rem; color: var(--text-muted); }

/* Scores */
.scores-body { padding: 1.25rem; }
.score-row { margin-bottom: 1rem; }
.score-row-active .score-label { color: var(--accent); font-weight: 600; }
.score-label { font-size: .9rem; color: var(--text-muted); }
.score-value { font-size: .9rem; font-weight: 600; color: var(--text-muted); }
.score-value-active { color: var(--accent); }

.score-bar-bg {
  background: var(--bg-card-alt);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: var(--border);
  border-radius: 99px;
}
.score-bar-active {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.text-accent { color: var(--accent); }

/* ════════════════════════════════════════════
   ABOUT PAGE
   ════════════════════════════════════════════ */
.about-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: .9rem; }
.info-value { font-weight: 600; font-size: .9rem; text-align: right; }

/* Architecture Diagram */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.arch-arrow { color: var(--text-muted); font-size: 1.2rem; padding: .2rem 0; }

.arch-layer {
  width: 100%;
  max-width: 540px;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: .75rem 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}
.input-layer  { border-color: var(--accent2); }
.output-layer { border-color: var(--success); }

.layer-badge {
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 99px;
}
.input-layer  .layer-badge { background: var(--accent2); }
.output-layer .layer-badge { background: var(--success); }
.layer-label { font-size: .9rem; font-weight: 600; }

.arch-block {
  width: 100%;
  max-width: 540px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1.5rem;
  background: var(--bg-card);
  transition: border-color .2s;
}
.arch-block:hover { border-color: var(--accent); }
.conv-block    { border-left: 3px solid var(--accent); }
.flatten-block { border-left: 3px solid var(--warning); }
.dense-block   { border-left: 3px solid var(--accent2); }

.layer-title  { font-weight: 700; font-size: .95rem; color: var(--text); }
.layer-detail { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }

/* Tech Cards */
.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all .2s;
}
.tech-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.tech-icon { font-size: 2rem; color: var(--accent); margin-bottom: .5rem; }
.tech-name { font-weight: 600; font-size: .9rem; }

/* Strategy Cards */
.strategy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: border-color .2s;
}
.strategy-card:hover { border-color: var(--accent); }
.strategy-card h5 { font-family: var(--font-display); font-weight: 700; }

/* Augmentation Grid */
.aug-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.aug-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .5rem 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 500;
  transition: border-color .2s;
}
.aug-item:hover { border-color: var(--accent); color: var(--accent); }
.aug-item i { color: var(--accent); }

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  font-size: .9rem;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
}

/* ════════════════════════════════════════════
   ERROR PAGES
   ════════════════════════════════════════════ */
.error-number {
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════ */
.alert {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
}
.alert-danger  { border-left: 3px solid var(--danger)  !important; }
.alert-warning { border-left: 3px solid var(--warning) !important; }
.alert-success { border-left: 3px solid var(--success) !important; }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-visual { width: 260px; height: 260px; }
  .hero-circle { width: 130px; height: 130px; }
  .arch-layer, .arch-block { max-width: 100%; }
  .step-number { width: 48px; height: 48px; line-height: 44px; }
}
