/* ========================================
   VARIABLES & RESET
======================================== */
:root {
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --accent: #f093fb;
  --success: #51cf66;
  --danger: #ff6b6b;
  --warning: #ffd43b;
  --dark: #1a1a2e;
  --dark-light: #16213e;
  --light: #f8f9fa;
  --text: #2d3436;
  --text-light: #636e72;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ========================================
   HOME BUTTON
======================================== */
.home-button {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.home-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.home-button svg {
  flex-shrink: 0;
}

/* ========================================
   ANIMATED BACKGROUND
======================================== */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  bottom: -10%;
  right: -10%;
  animation-delay: 7s;
}

.blob-3 {
  width: 450px;
  height: 450px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 30px) scale(0.9);
  }
}

/* ========================================
   CONTAINER
======================================== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* ========================================
   HEADER
======================================== */
.header {
  padding: 40px 0 30px;
  text-align: center;
  animation: slideDown 0.8s ease-out;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo-icon {
  font-size: 64px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.header h1 {
  font-size: 56px;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  margin-top: 10px;
}

/* ========================================
   CONFIG CARD
======================================== */
.config-container {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.config-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.config-header {
  text-align: center;
  margin-bottom: 40px;
}

.config-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.config-header p {
  color: var(--text-light);
  font-size: 16px;
}

.config-section {
  margin-bottom: 35px;
}

.config-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 15px;
}

.label-icon {
  font-size: 24px;
}

/* ========================================
   SLIDERS
======================================== */
.slider-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.slider {
  flex: 1;
  height: 8px;
  border-radius: 10px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.slider-value {
  min-width: 50px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 20px;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
}

.config-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
}

/* ========================================
   RADIO CARDS
======================================== */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.radio-card {
  cursor: pointer;
}

.radio-card input[type="radio"] {
  display: none;
}

.radio-content {
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--light);
  text-align: center;
  transition: var(--transition);
}

.radio-card input:checked+.radio-content {
  border-color: var(--primary);
  background: linear-gradient(135deg,
      rgba(102, 126, 234, 0.1),
      rgba(118, 75, 162, 0.1));
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.radio-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.radio-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.radio-description {
  font-size: 12px;
  color: var(--text-light);
}

/* ========================================
   DIVIDER
======================================== */
.config-divider {
  height: 1px;
  background: linear-gradient(to right,
      transparent,
      var(--border),
      transparent);
  margin: 40px 0;
}

/* ========================================
   PREVIEW SECTION
======================================== */
.preview-section {
  background: var(--light);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.preview-section h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  text-align: center;
}

.preview-grid {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  justify-content: center;
}

.preview-brick {
  width: 30px;
  height: 15px;
  border-radius: 3px;
  transition: var(--transition);
}

.preview-stats {
  display: flex;
  justify-content: space-around;
  gap: 20px;
}

.stat-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: white;
  border-radius: 8px;
  flex: 1;
}

.stat-icon {
  font-size: 24px;
}

.stat-text {
  font-size: 14px;
  color: var(--text-light);
}

.stat-text strong {
  color: var(--primary);
  font-size: 18px;
}

/* ========================================
   START BUTTON
======================================== */
.start-button {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.start-button:active {
  transform: translateY(0);
}

/* ========================================
   FOOTER
======================================== */
.footer {
  padding: 30px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-aspect-ratio: 1/1) {
  body {
    margin-top: 13px;
  }

  .home-button {
    top: 10px;
    left: 10px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .home-button svg {
    width: 13px;
    height: 13px;
  }

  .header h1 {
    font-size: 40px;
  }

  .logo-icon {
    font-size: 48px;
  }

  .config-card {
    padding: 25px;
  }

  .config-header h2 {
    font-size: 24px;
  }

  .container p,
  .container span,
  .container label,
  .container strong,
  .label-icon,
  .radio-label,
  .radio-icon,
  .stat-icon {
    font-size: 15px;
  }

  .preview-section h3 {
    font-size: 18px;
  }

  .radio-description {
    font-size: 13px;
  }

  .radio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-brick {
    width: 13px;
    height: 8px;
  }
}