@import url('https://fonts.googleapis.com/css2?family=Calistoga&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Backgrounds */
  --bg:             #F7FAFD;   /* Page base — cool white with slight blue tint */
  --muted:          #EBF2FA;   /* Secondary area background */
  --card:           #FFFFFF;   /* Card / panel surface */

  /* Foreground */
  --fg:             #0D1F35;   /* Primary text — deep navy */
  --muted-fg:       #5A7A9A;   /* Secondary / descriptive text */

  /* Borders */
  --border:         #D6E4F0;   /* Default border */
  --accent-border:  rgba(20, 120, 200, 0.25);

  /* SIKO Blue — brand accent */
  --accent:         #1478C8;   /* Primary brand blue */
  --accent-2:       #2878DC;   /* Gradient pair */
  --accent-light:   rgba(20, 120, 200, 0.08);  /* Badge / hover bg */

  /* Status Colors */
  --success:        #10B981;
  --success-light:  rgba(16, 185, 129, 0.1);
  --error:          #EF4444;
  --error-light:    rgba(239, 68, 68, 0.1);
  --warning:        #F59E0B;
  --warning-light:  rgba(245, 158, 11, 0.1);

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(20, 80, 160, 0.07);
  --shadow-md:      0 4px 16px rgba(20, 80, 160, 0.10);
  --shadow-lg:      0 12px 40px rgba(20, 80, 160, 0.14);
  --shadow-accent:  0 6px 24px rgba(20, 120, 200, 0.28);

  /* Shape */
  --radius:         16px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Texture System */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(20,120,200,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 90% 80%, rgba(40,120,220,0.05) 0%, transparent 55%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: radial-gradient(circle, rgba(20,120,200,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--fg);
}

.hero h1 {
  font-family: 'Calistoga', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.tech-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* Layout */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 560px;
}

.logo {
  height: 48px;
  object-fit: contain;
}

.subtitle {
  color: var(--muted-fg);
  font-size: 1.1rem;
}

.main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Components */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-accent);
  border-color: var(--accent-border);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-light), rgba(20, 120, 200, 0.02));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.card-desc {
  color: var(--muted-fg);
  font-size: 0.95rem;
  flex: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--accent-border);
  background: var(--accent-light);
  border-radius: 99px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  width: fit-content;
}

.badge.required {
  border-color: rgba(239, 68, 68, 0.3);
  background: var(--error-light);
  color: var(--error);
}

.badge.optional {
  border-color: var(--border);
  background: var(--muted);
  color: var(--muted-fg);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.badge.required .badge-dot {
  background: var(--error);
}

/* File Input Wrapper */
.file-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.file-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.file-upload-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

.file-upload-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.file-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2rem;
}

/* Console / Terminal Area */
.console-panel {
  background: var(--fg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 400px;
}

.console-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.console-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
}

.console-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #A0B2C6;
  line-height: 1.5;
}

.console-line {
  margin-bottom: 4px;
}

.console-line.info { color: #A0B2C6; }
.console-line.success { color: var(--success); }
.console-line.error { color: var(--error); }
.console-line.warning { color: var(--warning); }
.console-line.accent { color: #4DA3FF; }

/* Actions Area */
.actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-secondary {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--muted);
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-secondary:hover svg {
  transform: translateY(2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted-fg);
  opacity: 0.7;
  text-align: center;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.7s cubic-bezier(0.16,1,0.3,1) forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.35s; }

/* Responsive */
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .actions {
    flex-direction: column;
    width: 100%;
  }
  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .badge-dot { animation: none; }
  * { 
    animation-duration: 0.01ms !important; 
    transition-duration: 0.01ms !important; 
  }
}
