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

:root {
  --color-primary: #0a1628;
  --color-white: #ffffff;
  --color-accent: #b8860b;
  --color-bg: #f8f9fa;
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--color-white);
  color: var(--color-primary);
  overflow-x: hidden;
}

/* Top bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border: 1px solid transparent;
}

.back-button::before {
  content: "←";
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.back-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.back-button:hover::before {
  transform: translateX(-5px);
}

.top-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-logo img {
  width: 40px;
  height: 40px;
}

.top-logo-text {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-primary);
}

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

/* Main container */
.main-container {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

/* Page header */
.page-header {
  padding: 60px 5% 40px;
  border-bottom: 1px solid rgba(10, 22, 40, 0.08);
}

.page-breadcrumb {
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(10, 22, 40, 0.5);
  margin-bottom: 20px;
  font-weight: 300;
}

.page-title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 1rem;
  color: rgba(10, 22, 40, 0.6);
  font-weight: 300;
  max-width: 700px;
}

/* Formation display */
.formation-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 5%;
  position: relative;
  min-height: 500px;
  background: linear-gradient(
    to bottom,
    rgba(248, 249, 250, 0),
    rgba(248, 249, 250, 1)
  );
  transition: background 0.6s ease;
}

.formation-section.dark-mode {
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 40, 0.95),
    rgba(10, 22, 40, 1)
  );
}

.formation-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Background toggle button */
.bg-toggle {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(10, 22, 40, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.formation-section.dark-mode .bg-toggle {
  background: rgba(10, 22, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.bg-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(10, 22, 40, 0.15);
}

.formation-section.dark-mode .bg-toggle:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.bg-toggle-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 500;
  transition: color 0.3s ease;
}

.formation-section.dark-mode .bg-toggle-label {
  color: var(--color-white);
}

.bg-toggle-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.bg-toggle:hover .bg-toggle-icon {
  transform: rotate(180deg);
}

.bg-toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--color-primary);
  transition: fill 0.3s ease;
}

.formation-section.dark-mode .bg-toggle-icon svg {
  fill: var(--color-accent);
}

.plane {
  position: absolute;
  width: 60px;
  height: 60px;
  transition: all 0.8s var(--transition);
  opacity: 0;
  transform: scale(0);
}

.plane.active {
  opacity: 1;
  transform: scale(1);
}

.plane-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.plane svg {
  width: 100%;
  height: 100%;
  fill: var(--color-primary);
  filter: drop-shadow(0 2px 8px rgba(10, 22, 40, 0.15));
  animation: planeFloat 3s ease-in-out infinite;
  transition: fill 0.3s ease, filter 0.3s ease;
}

.formation-section.dark-mode .plane svg {
  fill: var(--color-accent);
  filter: drop-shadow(0 2px 12px rgba(184, 134, 11, 0.4));
}

.smoke-trail {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 3px;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    to right,
    transparent,
    var(--smoke-color),
    transparent
  );
  opacity: 0.6;
  filter: blur(2px);
  animation: smokeTrail 2s ease-in-out infinite;
}

@keyframes planeFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes smokeTrail {
  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scaleX(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scaleX(1.1);
  }
}

.plane:nth-child(1) svg {
  animation-delay: 0s;
}
.plane:nth-child(2) svg {
  animation-delay: 0.3s;
}
.plane:nth-child(3) svg {
  animation-delay: 0.6s;
}
.plane:nth-child(4) svg {
  animation-delay: 0.9s;
}
.plane:nth-child(5) svg {
  animation-delay: 1.2s;
}
.plane:nth-child(6) svg {
  animation-delay: 0.2s;
}
.plane:nth-child(7) svg {
  animation-delay: 0.5s;
}
.plane:nth-child(8) svg {
  animation-delay: 0.8s;
}
.plane:nth-child(9) svg {
  animation-delay: 1.1s;
}
.plane:nth-child(10) svg {
  animation-delay: 1.4s;
}

/* Control panel */
.control-panel {
  background: var(--color-bg);
  border-top: 1px solid rgba(10, 22, 40, 0.08);
  padding: 80px 5%;
}

.control-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 450px;
  gap: 40px;
  align-items: start;
}

/* Slider control */
.slider-control {
  background: var(--color-white);
  padding: 40px;
  border: 1px solid rgba(10, 22, 40, 0.08);
}

.slider-label {
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 15px;
  font-weight: 500;
}

.slider-title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 25px;
}

.slider-value-display {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 3.5rem;
  font-weight: 100;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.slider-unit {
  font-size: 0.85rem;
  color: rgba(10, 22, 40, 0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 30px;
  font-weight: 300;
}

/* Custom slider */
.slider-wrapper {
  position: relative;
  padding: 15px 0;
}

input[type="range"] {
  width: 100%;
  height: 2px;
  background: rgba(10, 22, 40, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--color-accent);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  cursor: pointer;
  border-radius: 50%;
  border: none;
  transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--color-accent);
}

.slider-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.7rem;
  color: rgba(10, 22, 40, 0.4);
  font-weight: 300;
}

/* Color picker section */
.color-section {
  background: var(--color-white);
  padding: 40px;
  border: 1px solid rgba(10, 22, 40, 0.08);
}

.color-grid {
  display: grid;
  gap: 20px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.color-grid::-webkit-scrollbar {
  width: 4px;
}

.color-grid::-webkit-scrollbar-track {
  background: rgba(10, 22, 40, 0.05);
}

.color-grid::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

.color-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  border: 1px solid rgba(10, 22, 40, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.color-item:hover {
  border-color: rgba(10, 22, 40, 0.2);
  transform: translateX(3px);
}

.pilot-number {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 70px;
  letter-spacing: 1px;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(10, 22, 40, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: var(--color-primary);
}

.color-swatch input[type="color"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Price summary */
.price-summary {
  background: var(--color-primary);
  padding: 50px 40px;
  position: sticky;
  top: 100px;
  border: 1px solid rgba(10, 22, 40, 0.1);
}

.price-label {
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
  font-weight: 400;
}

.price-amount {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.price-number {
  display: inline-block;
  transition: transform 0.6s var(--transition);
}

.price-currency {
  font-size: 1.8rem;
  vertical-align: super;
  color: var(--color-accent);
}

.price-details {
  margin: 30px 0;
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.price-detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.price-detail-label {
  font-weight: 300;
}

.price-detail-value {
  font-weight: 500;
  font-family: "Roboto Condensed", sans-serif;
  color: var(--color-white);
}

.rate-info {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  margin-bottom: 30px;
  font-weight: 300;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  padding: 16px 0;
  text-align: center;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.4s ease;
  cursor: pointer;
  border: none;
  font-family: "Roboto", sans-serif;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 1400px) {
  .control-grid {
    grid-template-columns: 1fr 1fr 400px;
  }

  .color-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1200px) {
  .control-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .price-summary,
  .color-section {
    grid-column: 1 / -1;
    position: relative;
    top: 0;
  }
}

@media (max-width: 968px) {
  .top-bar {
    height: 70px;
    padding: 0 4%;
  }

  .page-header {
    padding: 50px 4% 30px;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .formation-section {
    padding: 50px 4%;
    min-height: 400px;
  }

  .bg-toggle {
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    gap: 10px;
  }

  .bg-toggle-label {
    font-size: 0.65rem;
  }

  .bg-toggle-icon {
    width: 20px;
    height: 20px;
  }

  .formation-container {
    height: 350px;
  }

  .plane {
    width: 50px;
    height: 50px;
  }

  .control-panel {
    padding: 60px 4%;
  }

  .control-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .slider-control,
  .color-section {
    padding: 30px 25px;
  }

  .slider-title {
    font-size: 1.3rem;
  }

  .slider-value-display {
    font-size: 3rem;
  }

  .price-summary {
    padding: 40px 30px;
  }

  .price-amount {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .top-bar {
    height: 60px;
  }

  .back-button {
    font-size: 0.7rem;
    gap: 10px;
    padding: 8px 15px;
  }

  .top-logo-text {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .top-logo img {
    width: 35px;
    height: 35px;
  }

  .page-title {
    font-size: 2rem;
  }

  .formation-section {
    padding: 40px 4%;
    min-height: 300px;
  }

  .bg-toggle {
    top: 15px;
    right: 15px;
    padding: 8px 12px;
  }

  .formation-container {
    height: 250px;
  }

  .plane {
    width: 40px;
    height: 40px;
  }

  .slider-value-display {
    font-size: 2.5rem;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .price-currency {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.7rem;
  }

  .formation-container {
    height: 200px;
  }

  .plane {
    width: 35px;
    height: 35px;
  }

  .bg-toggle {
    padding: 6px 10px;
  }

  .bg-toggle-label {
    font-size: 0.6rem;
  }

  .bg-toggle-icon {
    width: 18px;
    height: 18px;
  }

  .slider-value-display {
    font-size: 2rem;
  }

  .price-amount {
    font-size: 2rem;
  }
}
