@import url(../../fonts/stylesheet.css);

:root {
  /* Light theme colors */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --background: #f0f4ff;
  --surface: rgba(255, 255, 255, 0.5);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --text-primary: #2c3e50;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --border: rgba(220, 225, 230, 0.8);
  --border-focus: var(--primary-color);
  --success: #10b981;
  --error: #ef4444;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
  --gradient-bg: linear-gradient(
    135deg,
    rgb(220, 225, 245),
    rgb(205, 215, 240),
    rgb(225, 215, 245)
  );
  --glass-bg: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(255, 255, 255, 0.5);
}

@media (prefers-color-scheme: dark) {
  /* Dark theme colors */
  :root {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: #312e81;
    --background: #0f172a;
    --surface: rgba(30, 41, 59, 0.9);
    --surface-hover: rgba(30, 41, 59, 0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(51, 65, 85, 0.8);
    --border-focus: var(--primary-color);
    --success: #22d3ee;
    --error: #f87171;
    --gradient-bg: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --glass-bg: rgba(30, 41, 59, 0.25);
    --glass-border: rgba(148, 163, 184, 0.18);
  }
}

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

body {
  font-family: "Inter 18pt", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  font-size: clamp(14px, 1.5vw, 16px);
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.app-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: clamp(16px, 2vw, 24px);
  padding: clamp(2rem, 5vw, 3rem);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 2.5rem);
}

.app-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.app-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 500;
}

.form-group {
  margin-bottom: clamp(1.25rem, 3vw, 1.5rem);
}

.form-label {
  display: block;
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.025em;
}

.form-input {
  width: 100%;
  padding: clamp(0.875rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.25rem);
  border: 2px solid var(--border);
  border-radius: clamp(8px, 1.5vw, 12px);
  background: var(--surface);
  color: var(--text-primary);
  font-size: clamp(0.9375rem, 2vw, 1rem);
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--border-focus);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.form-input:hover:not(:focus) {
  border-color: var(--primary-color);
  background: var(--surface-hover);
}

.btn-primary {
  width: 100%;
  padding: clamp(0.875rem, 2.5vw, 1rem) clamp(1.5rem, 4vw, 2rem);
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: clamp(8px, 1.5vw, 12px);
  font-size: clamp(0.9375rem, 2vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.result-section {
  margin-top: clamp(1rem, 4vw, 1.25rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid var(--border);
}

.result-label {
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.025em;
}

.result-display {
  padding: clamp(1rem, 3vw, 1.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(8px, 1.5vw, 12px);
  font-size: clamp(0.9375rem, 2vw, 1rem);
  font-weight: 500;
  min-height: 3rem;
  text-align: center;
  word-wrap: break-word;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-display.success {
  color: var(--success);
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.result-display.error {
  color: var(--error);
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 2vw, 1rem);
}

.stat-item {
  padding: clamp(0.75rem, 2vw, 1rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(6px, 1vw, 8px);
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.stat-label {
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.25rem;
}

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

.app-card {
  animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-section {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive design */
@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .app-card {
    padding: 1.5rem;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .app-card {
    max-width: 600px;
  }
}
