/* /style/style.css */

/* ------------------------------
   Base reset + variables (Aurora Green Theme)
   ------------------------------ */
:root {
  /* Aurora palette – soft “northern lights” oil greens */
  --primary: #7fe7b0;     /* mint-aurora */
  --secondary: #2fb6a6;   /* teal-aurora */
  --tertiary: #b7f5d6;    /* pale green glow */
  --deep: #0b1f1a;        /* deep northern night */
  --deep-2: #0f2b24;      /* secondary night */

  --card-bg: rgba(255, 255, 255, 0.94);
  --card-bg-fallback: rgba(255, 255, 255, 0.98);

  --text-dark: #17332b;
  --text-mid: #2b4f45;
  --text-light: #6a8d83;

  --white: #ffffff;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-card: 0 20px 60px rgba(10, 35, 28, 0.35);
  --shadow-hover: 0 8px 16px rgba(10, 35, 28, 0.12);

  --transition-fast: 0.2s ease;
  --transition: 0.3s ease;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ------------------------------
   Layout / body (Aurora background)
   ------------------------------ */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;

  min-height: 100vh;
  min-height: 100svh;

  /* Base aurora sky */
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(127, 231, 176, 0.55), transparent 60%),
    radial-gradient(1000px 600px at 90% 0%, rgba(47, 182, 166, 0.50), transparent 62%),
    radial-gradient(900px 700px at 50% 110%, rgba(103, 1, 74, 0.468), transparent 65%),
    linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 45%, #0a1916 100%);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  position: relative;
  overflow-x: hidden;

  line-height: 1.4;
}

/* Aurora glow layers */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  opacity: 0.75;
  mix-blend-mode: screen;
}

body::before {
  background:
    radial-gradient(800px 500px at 15% 30%, rgba(127, 231, 176, 0.80), transparent 60%),
    radial-gradient(900px 600px at 70% 20%, rgba(47, 182, 166, 0.75), transparent 62%),
    radial-gradient(700px 500px at 40% 80%, rgba(183, 245, 214, 0.70), transparent 65%);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(900px 700px at 80% 70%, rgba(127, 231, 176, 0.60), transparent 65%),
    radial-gradient(800px 600px at 25% 75%, rgba(47, 182, 166, 0.60), transparent 62%);
  animation: auroraDrift2 22s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0%   { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(2%, 1%, 0) rotate(6deg) scale(1.05); }
  100% { transform: translate3d(4%, 3%, 0) rotate(12deg) scale(1.1); }
}

@keyframes auroraDrift2 {
  0%   { transform: translate3d(4%, 3%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(-2%, -1%, 0) rotate(-6deg) scale(1.04); }
  100% { transform: translate3d(-4%, -3%, 0) rotate(-12deg) scale(1.08); }
}

/* ------------------------------
   Animated background circles (match aurora)
   ------------------------------ */
.bg-animation {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(127, 231, 176, 0.25), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(47, 182, 166, 0.22), transparent 65%);
  animation: float 20s infinite ease-in-out;
  will-change: transform;
  filter: blur(6px);
}

.bg-circle:nth-child(1) {
  width: 360px;
  height: 360px;
  top: -120px;
  left: -120px;
  animation-delay: 0s;
}

.bg-circle:nth-child(2) {
  width: 240px;
  height: 240px;
  bottom: -70px;
  right: -70px;
  animation-delay: 5s;
}

.bg-circle:nth-child(3) {
  width: 180px;
  height: 180px;
  top: 48%;
  right: 8%;
  animation-delay: 10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ------------------------------
   Container
   ------------------------------ */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 550px;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ------------------------------
   APP HEADER
   ------------------------------ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
  padding: 0 6px;
  margin-bottom: 4px;
}

.app-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: rgba(232, 255, 246, 0.98);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.app-header .btn {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
}

/* ------------------------------
   Card
   ------------------------------ */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: var(--radius-lg);
  padding: 40px;

  box-shadow: var(--shadow-card);
  animation: slideIn 0.6s ease-out;
}

@supports not ((backdrop-filter: blur(10px))) {
  .card {
    background: var(--card-bg-fallback);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 35px;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;

  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  margin-bottom: 8px;
}

.header p {
  color: #355b52;
  font-size: 14px;
}

/* ------------------------------
   Rolling symbols animation
   ------------------------------ */
#animation-container {
  display: flex;
  font-size: 42px;
  color: var(--secondary);
  font-weight: bold;

  white-space: nowrap;
  overflow: hidden;
  justify-content: center;

  margin-bottom: 30px;
  min-height: 50px;
  letter-spacing: 4px;
  font-family: "Courier New", monospace;
}

/* ------------------------------
   Password display
   ------------------------------ */
.password-display {
  background:
    linear-gradient(135deg, rgba(240, 255, 249, 1) 0%, rgba(210, 240, 230, 1) 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;

  position: relative;
  overflow: hidden;

  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;

  transition: all var(--transition);
  cursor: pointer;
}

.password-display:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.password-display.clickable:hover {
  background:
    linear-gradient(135deg, rgba(233, 250, 244, 1) 0%, rgba(199, 231, 220, 1) 100%);
}

.password-text {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);

  letter-spacing: 2px;
  word-break: break-all;
  text-align: center;

  font-family: "Courier New", monospace;
}

.password-placeholder {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 400;
}

/* ------------------------------
   Strength indicator
   ------------------------------ */
.strength-indicator {
  margin-bottom: 20px;
  display: none;
}

.strength-indicator.show {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.strength-bar {
  height: 6px;
  background: #d7e6e1;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: all 0.5s ease;
  width: 0;
}

.strength-text {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* ------------------------------
   Options / sliders / checkboxes
   ------------------------------ */
.options {
  margin-bottom: 24px;
}

.option-group {
  margin-bottom: 20px;
}

.option-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;

  background: linear-gradient(to right, var(--primary) 0%, var(--secondary) 100%);
  outline: none;

  opacity: 0.8;
  transition: opacity var(--transition-fast);

  -webkit-appearance: none;
  appearance: none;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;

  width: 20px;
  height: 20px;
  border-radius: 50%;

  background: var(--white);
  cursor: pointer;

  box-shadow: 0 2px 7px rgba(5, 35, 28, 0.25);
  transition: transform var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;

  background: var(--white);
  cursor: pointer;

  box-shadow: 0 2px 7px rgba(5, 35, 28, 0.25);
  border: none;

  transition: transform var(--transition-fast);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.slider-value {
  display: inline-block;
  background: var(--secondary);
  color: var(--white);

  padding: 4px 12px;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 600;
  margin-left: 12px;
}

.checkboxes {
  display: grid;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;

  margin-right: 10px;
  cursor: pointer;

  accent-color: var(--secondary);
}

.checkbox-item label {
  font-size: 14px;
  color: var(--text-mid);
  cursor: pointer;
}

/* ------------------------------
   Buttons
   ------------------------------ */
.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);

  font-size: 16px;
  font-weight: 600;

  cursor: pointer;
  transition: all var(--transition);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--deep);

  box-shadow: 0 6px 14px rgba(47, 182, 166, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(47, 182, 166, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-2px);
}

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

/* Focus ring */
.btn:focus-visible,
.slider:focus-visible,
.checkbox-item input[type="checkbox"]:focus-visible,
.password-display:focus-visible {
  outline: 3px solid rgba(47, 182, 166, 0.5);
  outline-offset: 2px;
}

/* ------------------------------
   Notification
   ------------------------------ */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;

  background: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-sm);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);

  display: flex;
  align-items: center;
  gap: 12px;

  z-index: 1000;
  transform: translateX(400px);
  transition: transform var(--transition);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid #48bb78;
}

.notification.error {
  border-left: 4px solid #f56565;
}

.notification-icon {
  font-size: 24px;
}

.notification-text {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

/* ------------------------------
   Footer
   ------------------------------ */
.footer {
  text-align: center;
  margin-top: 10px;
  color: rgba(224, 255, 242, 0.9);
  font-size: 14px;
}

.footer a {
  color: rgba(224, 255, 242, 1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------
   Responsive
   ------------------------------ */
@media (max-width: 600px) {
  .container {
    gap: 10px;
  }

  .app-header {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .app-logo {
    font-size: 18px;
  }

  .card {
    padding: 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .password-text {
    font-size: 18px;
  }

  #animation-container {
    font-size: 32px;
  }

  .buttons {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------
   Accessibility / reduced motion
   ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  body::before,
  body::after {
    animation: none !important;
  }
}

/* Минимални стилове за мобилен инсталационен банер */
.install-banner {
      position: sticky;
      top: 0;
      z-index: 9999;
      display: none;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      font-size: 0.9rem;
      line-height: 1.2;
      background: rgba(0, 0, 0, 0.75);
      color: #fff;
      backdrop-filter: blur(6px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .install-banner__text {
      flex: 1;
    }

    .install-banner__btn {
      border: 0;
      padding: 6px 10px;
      border-radius: 10px;
      font-weight: 600;
      cursor: pointer;
      background: #2fb6a6;
      color: #001a17;
      white-space: nowrap;
    }

    .install-banner__close {
      border: 0;
      padding: 6px 8px;
      border-radius: 8px;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
    }

/* ------------------------------
   Cookie Consent Banner
   ------------------------------ */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  border: 1px solid rgba(47, 182, 166, 0.2);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from { transform: translate(-50%, 100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-content p {
  font-size: 14px;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.5;
}

.cookie-content a {
  color: var(--secondary);
  text-decoration: underline;
  font-weight: 600;
}

.cookie-buttons {
  flex-shrink: 0;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

@media (max-width: 600px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .cookie-banner {
    bottom: 10px;
    width: 95%;
  }
}