* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08111f;
  color: #f4f7fb;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px;
}

.hero {
  text-align: center;
  padding: 28px 10px 18px;
}

.hero.small {
  padding: 18px 10px;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 1px;
}

.hero p {
  margin: 6px 0 0;
  color: #9fb0c7;
}

.card, .threat-card {
  background: #111d31;
  border: 1px solid #22324c;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.card.compact {
  padding: 14px 16px;
}

.card h2, .threat-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

label {
  display: block;
  margin: 14px 0 6px;
  color: #c8d4e5;
  font-size: 14px;
}

input {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid #31425f;
  background: #07101d;
  color: white;
  font-size: 18px;
  text-transform: uppercase;
}

input::placeholder {
  color: #64748b;
}

.or {
  text-align: center;
  margin: 18px 0 4px;
  color: #7f8da3;
  font-weight: 600;
}

details {
  margin-top: 18px;
  background: #0b1526;
  border-radius: 14px;
  padding: 14px;
}

summary {
  cursor: pointer;
  color: #d6e4ff;
  font-weight: 600;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: #3b82f6;
  color: white;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.threat-low {
  display: inline-block;
  background: #16a34a;
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  margin-bottom: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  background: #0b1526;
  border: 1px solid #2f4363;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.muted {
  opacity: 0.65;
}

.back {
  display: block;
  text-align: center;
  color: #93c5fd;
  text-decoration: none;
  margin: 24px 0;
  font-weight: 700;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #07101d;
  border: 1px solid #263957;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #e5eefc;
}

.label-small {
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.applicable-box {
  background: #0b1526;
  border: 1px solid #2f4363;
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
}

details {
  margin-top: 12px;
}

details summary {
  background: #0b1526;
  border: 1px solid #2f4363;
  border-radius: 12px;
  padding: 12px;
}

.sat-img {
  width: 100%;
  border-radius: 12px;
  margin: 10px 0 20px 0;
  border: 1px solid #2f4363;
}

.sat-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sat-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0b1526;
  border: 1px solid #2f4363;
  border-radius: 14px;
  padding: 14px 8px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  min-height: 58px;
}

.sat-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
}

.sat-buttons {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
}

.sat-buttons a {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 70px !important;
  border: 1px solid #2f4363 !important;
  border-radius: 14px !important;
  background: #0b1526 !important;
  color: #60a5fa !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.top-nav{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap:8px;
    width:100%;
    margin:0 0 14px 0;
}

.nav-btn{
    background:#ffffff;
    color:#0b1220 !important;
    text-decoration:none;
    padding:11px 6px;
    border-radius:8px;
    font-weight:800;
    font-size:15px;
    text-align:center;
    display:block;
    box-shadow:0 2px 8px rgba(0,0,0,0.25);
}

.nav-btn:hover{
    background:#e5e7eb;
}

@media (max-width: 768px){
    body{
        font-size:18px;
    }

    .card{
        margin:10px 0;
        padding:16px;
        border-radius:12px;
    }

    input, button, select{
        font-size:18px !important;
        min-height:46px;
    }

    .nav-btn{
        font-size:16px;
        padding:12px 4px;
    }
}

.sat-btn{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:52px;
    border:1px solid #2f4363;
    border-radius:12px;
    background:#0b1526;
    color:#93c5fd !important;
    text-decoration:none;
    font-weight:800;
    font-size:13px;
    text-align:center;
}

.section-departure{
    background:#11253d;
}

.section-destination{
    background:#14344a;
}

.section-alt1{
    background:#2d2b1f;
}

.section-alt2{
    background:#23274a;
}

.section-tag {
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    font-size:13px;
    font-weight:800;
    margin-bottom:10px;
    background:rgba(255,255,255,0.12);
}

.applicable-box {
    margin-top:12px;
    padding:14px;
    border-radius:12px;
}

details {
    margin-top:12px;
}

details summary {
    cursor:pointer;
}

.applicable-box{
    border:none !important;
    background:transparent !important;
    padding:8px 0 !important;
    margin:12px 0 !important;
}

.applicable-box pre,
pre{
    border:1px solid #334155;
    border-radius:12px;
    padding:14px;
    background:#020617;
}

details{
    border:1px solid #334155;
    border-radius:12px;
    padding:12px;
    margin:12px 0;
    background:transparent;
}

details summary{
    font-weight:800;
    font-size:18px;
}

.home-logo{
    width:82px;
    height:82px;
    border-radius:18px;
    margin-bottom:8px;
}

.hero.compact{
    margin-bottom:14px;
}

.hero.compact h1{
    margin:4px 0;
}

.hero.compact p{
    margin:0;
}

.route-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.flight-option{
    display:grid;
    grid-template-columns:32px 1fr;
    gap:12px;
    align-items:center;
    padding:14px;
    border:1px solid #334155;
    border-radius:12px;
    margin-bottom:10px;
    background:rgba(255,255,255,0.04);
    width:100%;
    box-sizing:border-box;
}

.flight-option input[type="radio"]{
    width:22px !important;
    height:22px !important;
    min-height:22px !important;
    margin:0;
}

.flight-option span{
    display:block;
    overflow-wrap:anywhere;
    line-height:1.35;
}

.quick-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.quick-actions a{
    text-decoration:none;
}

@media (max-width: 500px){
    .route-grid{
        grid-template-columns:1fr;
        gap:0;
    }

    .quick-actions{
        grid-template-columns:1fr;
    }
}

.loading-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(2,6,23,0.92);
    z-index:9999;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    color:white;
    text-align:center;
    padding:24px;
}

.loading-spinner{
    width:54px;
    height:54px;
    border:6px solid rgba(255,255,255,0.25);
    border-top-color:#3b82f6;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin-bottom:18px;
}

@keyframes spin{
    to { transform:rotate(360deg); }
}

.loading-overlay p{
    font-size:18px;
    font-weight:700;
    margin:4px 0;
}

.loading-overlay small{
    opacity:0.75;
}

.or-divider{
    display:flex;
    align-items:center;
    margin:22px 0;
}

.or-divider::before,
.or-divider::after{
    content:"";
    flex:1;
    height:1px;
    background:#314155;
}

.or-divider span{
    margin:0 14px;
    padding:5px 14px;
    border-radius:999px;
    background:#14233d;
    color:#8fb7ff;
    font-size:13px;
    font-weight:700;
    letter-spacing:1px;
    border:1px solid #2e4f87;
}

.card-subtitle{
    margin-top:-8px;
    margin-bottom:18px;
    color:#94a3b8;
    font-size:14px;
    line-height:1.4;
}

.daylight-box{
    margin:10px 0 14px;
    padding:8px 12px;
    border-radius:10px;

    background:#1d2735;
    border:1px solid #344155;

    font-size:13px;
    line-height:1.55;

    color:#e5e7eb;
}

.subsection-heading{
    margin:20px 0 12px;
    padding-top:12px;

    border-top:1px solid rgba(255,255,255,0.12);

    font-size:20px;
    font-weight:700;
    color:#ffffff;
}

.weather-divider{
    margin:18px 0 14px;
    height:1px;
    background:rgba(255,255,255,0.18);
}

.subsection-heading{
    margin:0 0 18px;
    font-size:22px;
    font-weight:800;
    color:#ffffff;
}

.route-grid{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap:12px !important;
    align-items:end;
}

.route-grid input{
    width:100%;
}

.aircraft-info{
    margin:16px 0;
    padding:14px;
    border-radius:12px;
    background:#1d2735;
    border:1px solid #344155;
}

.aircraft-info h3{
    margin-top:0;
    margin-bottom:10px;
}
