.amt-root{
  --amt-bg:#081224;
  --amt-panel:#0c1833;
  --amt-soft:#132447;
  --amt-border:#1d3768;
  --amt-text:#eef4ff;
  --amt-sub:#c3d4f3;
  --amt-accent:#2f73ff;
  --amt-accent-2:#1953c7;
  --amt-shadow:0 18px 40px rgba(0,0,0,.22);
  font-family:Arial,sans-serif;
  color:var(--amt-text);
  margin:24px auto;
  max-width:1200px;
}

.amt-shell{
  background:linear-gradient(180deg,#081224,#081224);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--amt-shadow);
  border:1px solid rgba(255,255,255,.04);
}

.amt-grid{
  display:grid;
  grid-template-columns:1.35fr .95fr;
  gap:18px;
}

.amt-panel{
  background:linear-gradient(180deg,#0b1730,#0b1730);
  border:1px solid var(--amt-border);
  border-radius:20px;
  padding:20px;
  min-width:0;
}

.amt-title{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.15;
  color:#fff;
  font-weight:800;
}

.amt-subtitle{
  margin:0;
  font-size:28px;
  line-height:1.2;
  color:#fff;
  font-weight:800;
}

.amt-desc{
  margin:0 0 20px;
  color:var(--amt-sub);
  line-height:1.7;
  font-size:16px;
}

.amt-controls{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.amt-field label{
  display:block;
  margin-bottom:8px;
  font-weight:700;
  color:#ffffff;
  font-size:15px;
}

.amt-input,
.amt-select{
  width:100%;
  height:50px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--amt-border);
  background:#15284f;
  color:#fff;
  box-sizing:border-box;
  font-size:15px;
  outline:none;
}

.amt-input:focus,
.amt-select:focus{
  border-color:#4c84ff;
  box-shadow:0 0 0 3px rgba(76,132,255,.15);
}

.amt-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.amt-btn{
  border:none;
  background:linear-gradient(135deg,var(--amt-accent),var(--amt-accent-2));
  color:#fff;
  padding:12px 18px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  box-shadow:0 10px 18px rgba(31,93,236,.18);
}

.amt-btn:hover{
  transform:translateY(-1px);
}

.amt-btn-secondary{
  background:linear-gradient(135deg,#30456e,#243455);
  box-shadow:none;
}

.amt-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

.amt-stat,
.amt-report-item,
.amt-phase-box,
.amt-visual-note{
  background:#132447;
  border:1px solid var(--amt-border);
  border-radius:14px;
  padding:14px;
}

.amt-label,
.amt-report-item span,
.amt-phase-box span,
.amt-visual-note span{
  display:block;
  font-size:12px;
  color:var(--amt-sub);
  margin-bottom:6px;
}

.amt-value,
.amt-report-item strong,
.amt-phase-box strong,
.amt-visual-note strong{
  font-size:22px;
  color:#fff;
  font-weight:800;
  line-height:1.2;
}

.amt-report{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

.amt-phase-strip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.amt-phase-box small{
  display:block;
  margin-top:6px;
  color:#bcd0f7;
  font-size:13px;
}

.amt-suggestions h3{
  margin:0 0 12px;
  color:#fff;
  font-size:22px;
}

.amt-suggestion-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.amt-suggestion{
  background:#132447;
  border:1px solid var(--amt-border);
  border-radius:14px;
  padding:12px 14px;
}

.amt-suggestion strong{
  display:block;
  color:#fff;
  margin-bottom:4px;
  font-size:18px;
}

.amt-suggestion span{
  color:#c0d3fb;
  font-size:13px;
}

.amt-visual-panel{
  display:flex;
  flex-direction:column;
}

.amt-visual-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.amt-moon-stage{
  position:relative;
  min-height:430px;
  border-radius:22px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 42%, rgba(73,115,218,.18), transparent 30%),
    radial-gradient(circle at center,#0e2350 0%, #071229 58%, #040812 100%);
  border:1px solid rgba(255,255,255,.05);
  perspective:1000px;
}

.amt-space-glow{
  position:absolute;
  width:300px;
  height:300px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(110,158,255,.2) 0%,rgba(110,158,255,.08) 35%,transparent 70%);
  filter:blur(10px);
  z-index:0;
}

.amt-stars{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(rgba(255,255,255,.95) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.55) 1px, transparent 1px);
  background-size:30px 30px, 55px 55px;
  background-position:0 0, 12px 18px;
  opacity:.2;
  z-index:0;
}

.amt-orbit-ring{
  position:absolute;
  width:320px;
  height:320px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.08);
  z-index:0;
}

.amt-moon-wrap{
  position:relative;
  z-index:2;
  transform-style:preserve-3d;
  will-change:transform;
}

.amt-moon{
  width:230px;
  height:230px;
  border-radius:50%;
  position:relative;
  background:radial-gradient(circle at 35% 35%,#f8fbff,#dce4f7 55%,#b9c7e2 100%);
  box-shadow:
    0 0 30px rgba(179,212,255,.15),
    0 0 60px rgba(107,150,255,.12),
    inset -18px -18px 35px rgba(0,0,0,.35);
  z-index:2;
  will-change:transform;
}

.amt-moon:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:50%;
}

.phase-new:before{
  background:radial-gradient(circle at 60% 50%,rgba(5,8,16,.96) 0 66%,rgba(5,8,16,.99) 100%);
}

.phase-full:before{
  background:transparent;
}

.phase-crescent-wax:before{
  background:radial-gradient(circle at 76% 50%,transparent 0 25%,rgba(5,8,16,.97) 36% 100%);
}

.phase-quarter-first:before{
  background:linear-gradient(90deg,transparent 0 50%,rgba(5,8,16,.98) 50% 100%);
}

.phase-gibbous-wax:before{
  background:radial-gradient(circle at 92% 50%,rgba(5,8,16,.98) 0 42%,transparent 56% 100%);
}

.phase-gibbous-wane:before{
  background:radial-gradient(circle at 8% 50%,rgba(5,8,16,.98) 0 42%,transparent 56% 100%);
}

.phase-quarter-last:before{
  background:linear-gradient(90deg,rgba(5,8,16,.98) 0 50%,transparent 50% 100%);
}

.phase-crescent-wane:before{
  background:radial-gradient(circle at 24% 50%,transparent 0 25%,rgba(5,8,16,.97) 36% 100%);
}

.amt-moon-caption{
  margin-top:14px;
  color:#e8f0ff;
  font-weight:800;
  text-align:center;
  font-size:20px;
}

.amt-visual-notes{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}

@media print{
  body *{
    visibility:hidden;
  }

  #astro-moon-tool-v6,
  #astro-moon-tool-v6 *{
    visibility:visible;
  }

  #astro-moon-tool-v6{
    position:absolute;
    left:0;
    top:0;
    width:100%;
  }

  .amt-shell,
  .amt-panel{
    box-shadow:none;
    background:#fff !important;
    color:#000 !important;
    border:1px solid #ddd !important;
  }

  .amt-title,
  .amt-subtitle,
  .amt-value,
  .amt-report-item strong,
  .amt-suggestions h3,
  .amt-moon-caption,
  .amt-phase-box strong,
  .amt-visual-note strong,
  .amt-suggestion strong{
    color:#000 !important;
  }

  .amt-desc,
  .amt-label,
  .amt-report-item span,
  .amt-suggestion span,
  .amt-phase-box span,
  .amt-visual-note span,
  .amt-phase-box small{
    color:#444 !important;
  }

  .amt-btn{
    display:none !important;
  }

  .amt-stat,
  .amt-report-item,
  .amt-phase-box,
  .amt-visual-note,
  .amt-suggestion{
    background:#fff !important;
    border:1px solid #ddd !important;
  }
}

@media (max-width:980px){
  .amt-grid{
    grid-template-columns:1fr;
  }

  .amt-controls,
  .amt-report,
  .amt-stats,
  .amt-suggestion-list,
  .amt-phase-strip,
  .amt-visual-notes{
    grid-template-columns:1fr;
  }

  .amt-moon{
    width:190px;
    height:190px;
  }

  .amt-moon-stage{
    min-height:340px;
  }

  .amt-visual-head{
    flex-direction:column;
    align-items:flex-start;
  }
}