:root {
  --bg: #000000;
  --text: #ffffff;
  --hover-dim: #999999;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Interactive constellation canvas background */
#constellation-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.view {
  display: none;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content; /* This makes the box shrink to content, ensuring true centering */
  max-width: 90vw;
  padding: 40px;
}

.view.active {
  display: block;
  opacity: 1;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view.fade-out {
  animation: fadeOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

/* Staggered animation for list items */
.view.active li {
  opacity: 0;
  animation: slideRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view.active li:nth-child(1) { animation-delay: 0.10s; }
.view.active li:nth-child(2) { animation-delay: 0.15s; }
.view.active li:nth-child(3) { animation-delay: 0.20s; }
.view.active li:nth-child(4) { animation-delay: 0.25s; }
.view.active li:nth-child(5) { animation-delay: 0.30s; }
.view.active li:nth-child(6) { animation-delay: 0.35s; }
.view.active li:nth-child(7) { animation-delay: 0.40s; }
.view.active li:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Subtle fade in for about text */
.view.active .about-text {
  opacity: 0;
  animation: fadeText 0.8s ease forwards 0.2s;
}

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

.title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 300;
  margin: 0 0 35px 0;
  letter-spacing: -0.01em;
  padding-left: 36px; /* 14px bullet + 22px margin */
  line-height: 1;
}

ul.menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.menu li {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 300;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.bullet {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--text);
  border-radius: 50%;
  margin-right: 22px;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effects */
li:hover .bullet {
  transform: scale(1.3);
  box-shadow: 0 0 10px 2px rgba(255,255,255,0.25); /* Glowing effect */
}

.back-icon {
  font-size: clamp(1.8rem, 5vw, 2.5rem); /* Match the text size perfectly */
  margin-right: 28px; /* Much wider gap so it doesn't stick */
  line-height: 1;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  padding-bottom: 2px; /* optical vertical alignment tweak */
}

.page-header:hover .back-icon {
  transform: translateX(-6px);
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

li:hover .action-btn {
  color: var(--hover-dim);
}

.page-header:hover .action-btn {
  color: var(--hover-dim);
}

.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 35px;
  cursor: pointer;
  width: fit-content;
  transition: transform 0.3s ease;
}

.page-header:hover {
  transform: translateX(-4px); /* Slight pull left on hover */
}

.page-header .action-btn {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.submenu {
  padding-left: 36px;
}

ul.submenu li {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.submenu .action-btn {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  color: #dddddd; /* Slightly dimmer by default for submenu items */
}

.submenu li:hover .action-btn {
  color: var(--text); /* Lights up purely white on hover */
  text-shadow: 0 0 12px rgba(255,255,255,0.4);
  letter-spacing: 0.02em; /* slight spacing expansion on hover */
}

.app-note {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--hover-dim);
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  font-style: italic;
  line-height: 1.5;
  padding-left: 2px;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease 0.05s,
              margin 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0;
}

.submenu li:hover .app-note {
  max-height: 60px;
  opacity: 1;
  margin-top: 6px;
}

.about-text {
  padding-left: 36px;
  font-size: clamp(1rem, 3vw, 1.3rem);
  line-height: 1.8;
  color: #dddddd;
  margin: 0;
  font-style: italic; /* Adding italic to make it look a bit more stylish/quote-like */
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .title {
    padding-left: 28px;
  }
  .submenu {
    padding-left: 28px;
  }
  .about-text {
    padding-left: 28px;
  }
  .bullet {
    margin-right: 14px;
    width: 12px;
    height: 12px;
  }
  .about-actions {
    padding-left: 28px;
    margin-top: 25px;
  }
}

.about-actions {
  display: flex;
  gap: 16px;
  padding-left: 36px;
  margin-top: 30px;
  opacity: 0;
  animation: fadeText 0.8s ease forwards 0.4s;
}

.pill-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  font-family: inherit;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 300;
  padding: 8px 24px;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.pill-btn:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: max-content;
  max-width: 90vw;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 20px 30px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 25px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.cookie-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #eeeeee;
  max-width: 400px;
}

.cookie-actions {
  display: flex;
  gap: 12px;
}

.cookie-accept, .cookie-decline {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.cookie-accept {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 650px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    bottom: 20px;
    gap: 18px;
    padding: 20px;
    width: 90vw;
  }
}

/* ============================================
   KALKULATOR PENDINGIN
   ============================================ */

#view-calc-pendingin .page-header .action-btn {
  font-size: clamp(1.4rem, 4vw, 2rem);
}

#view-calc-pendingin {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-height: 100dvh;
  overflow-y: auto;
  padding-top: 15px;
  padding-bottom: 40px;
}

#view-calc-pendingin.active {
  animation: fadeCalcView 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeCalcView {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#view-calc-pendingin.fade-out {
  animation: fadeCalcViewOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeCalcViewOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-15px); }
}

/* Hide scrollbar but keep scroll */
#view-calc-pendingin::-webkit-scrollbar {
  width: 0;
}

.calc-container {
  padding-left: 36px;
  max-width: 520px;
}

/* Step Indicator */
.calc-steps-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  gap: 0;
}

.calc-step-dot {
  background: none;
  border: 2px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  font-family: inherit;
  position: relative;
}

.calc-step-dot .dot-number {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1;
}

.calc-step-dot .dot-label {
  position: absolute;
  top: 46px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.calc-step-dot.active {
  border-color: var(--text);
  color: var(--text);
}

.calc-step-dot.active .dot-label {
  opacity: 1;
}

.calc-step-dot.current {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.15);
  transition: background 0.4s ease;
  min-width: 20px;
}

.step-line.active {
  background: rgba(255,255,255,0.6);
}

/* Step Content */
.calc-step {
  display: none;
  animation: fadeCalcIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.calc-step.active {
  display: block;
}

@keyframes fadeCalcIn {
  from { opacity: 0; transform: translateX(15px); }
  to   { opacity: 1; transform: translateX(0); }
}

.calc-step-title {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 300;
  margin: 0 0 6px 0;
  color: var(--text);
}

.calc-step-desc {
  font-size: 0.9rem;
  color: var(--hover-dim);
  margin: 0 0 20px 0;
}

/* Cards */
.calc-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
}

.calc-card:hover {
  border-color: rgba(255,255,255,0.2);
}

.calc-card-title {
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 16px 0;
  color: var(--text);
}

/* Form Fields */
.calc-field {
  display: flex;
  flex-direction: column;
}

.calc-field label {
  font-size: 0.85rem;
  color: var(--hover-dim);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.calc-field input[type="number"],
.calc-field select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 300;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -moz-appearance: textfield;
}

.calc-field input[type="number"]::-webkit-inner-spin-button,
.calc-field input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

.calc-field input:focus,
.calc-field select:focus {
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

.calc-field input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calc-field select option {
  background: #111;
  color: #fff;
}

.calc-input-row {
  display: flex;
  gap: 12px;
}

.calc-input-row .calc-field {
  flex: 1;
}

.calc-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin: 6px 0 0 0;
  font-style: italic;
}

/* Toggle Switch */
.calc-toggle {
  display: flex;
  align-items: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 12px;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--text);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-label input:checked + .toggle-slider {
  background: rgba(255,255,255,0.5);
}

.toggle-label input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 0.95rem;
  color: #ddd;
}

/* Range Slider */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
  margin-top: 8px;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.calc-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--text);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Navigation */
.calc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-bottom: 20px;
}

.calc-nav-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 300;
  padding: 10px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calc-nav-btn:hover {
  border-color: var(--text);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 12px rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.calc-nav-btn.calc-submit {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
}

.calc-nav-btn.calc-submit:hover {
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

/* ============================================
   RESULT SECTION
   ============================================ */

.calc-result {
  opacity: 0;
  transform: translateY(15px);
}

.calc-result.active {
  animation: fadeCalcResultIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.calc-result-card {
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid;
}

.card-blue {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

.card-green {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

.card-orange {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.3);
}

.result-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: #ddd;
  margin-bottom: 16px;
}

.result-icon {
  font-size: 1.3rem;
}

.result-main-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.result-big-number {
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}

.result-unit {
  font-size: 1.1rem;
  color: var(--hover-dim);
}

.result-sub {
  font-size: 0.9rem;
  color: var(--hover-dim);
}

.result-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 16px 0;
}

.result-stats {
  display: flex;
  justify-content: space-around;
}

.result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-icon {
  font-size: 1.1rem;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--hover-dim);
}

.result-sub-info {
  font-size: 0.85rem;
  color: var(--hover-dim);
  margin: 8px 0 0 0;
}

.result-cost {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

.calc-note-info {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 2px solid rgba(255,255,255,0.15);
}

/* Calculator Mobile */
@media (max-width: 480px) {
  .calc-container {
    padding-left: 0;
  }
  
  .calc-input-row {
    flex-direction: column;
    gap: 12px;
  }

  .calc-steps-indicator {
    margin-bottom: 40px;
  }

  .calc-step-dot {
    width: 34px;
    height: 34px;
  }

  .calc-step-dot .dot-number {
    font-size: 0.75rem;
  }

  .calc-step-dot .dot-label {
    font-size: 0.6rem;
  }

  .calc-card {
    padding: 16px;
  }

  .result-stats {
    gap: 16px;
  }
}
