*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:'Inter',system-ui,sans-serif;
  background:#080b14 url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=1920&q=80') center/cover no-repeat fixed;
  color:#d9e1f2;
  min-height:100vh;
  overflow-x:hidden;
  position:relative;
}
body::before{
  content:'';
  position:fixed;
  inset:0;
  background:rgba(8,11,20,0.78);
  z-index:0;
}
.wrap{
  max-width:900px;
  margin:0 auto;
  padding:36px 24px 60px;
  position:relative;
  z-index:1;
}
.top{
  text-align:center;
  margin-bottom:26px;
}
.greeting{
  font-family:'Cormorant Garamond',serif;
  font-size:18px;
  color:#8895b3;
  font-style:italic;
  margin-bottom:12px;
}
.greeting span{
  color:#ece4cf;
  font-style:normal;
}
#clock{
  font-size:50px;
  font-weight:500;
  letter-spacing:1px;
  color:#ece4cf;
  font-variant-numeric:tabular-nums;
  line-height:1;
}
#date{
  font-size:13px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:#5c6b8c;
  margin-top:7px;
}
.search-box{
  margin:0 auto 20px;
  max-width:560px;
}
#search{
  width:100%;
  padding:13px 18px;
  border-radius:999px;
  border:1px solid rgba(140,163,204,0.2);
  background:rgba(20,28,51,0.55);
  color:#d9e1f2;
  font-size:15px;
  outline:none;
}
#search:focus{
  border-color:rgba(232,168,84,0.55);
}
.links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:32px;
}
.links a{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 15px;
  border-radius:999px;
  border:1px solid rgba(140,163,204,0.16);
  background:rgba(20,28,51,0.4);
  color:#8895b3;
  text-decoration:none;
  font-size:13px;
}
.links a:hover{
  border-color:rgba(232,168,84,0.4);
  color:#ece4cf;
}
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.card{
  background:linear-gradient(180deg,rgba(20,28,51,0.75),rgba(14,20,36,0.75));
  border:1px solid rgba(140,163,204,0.14);
  border-radius:12px;
  padding:16px;
}
.card h2{
  font-family:'Cormorant Garamond',serif;
  font-size:19px;
  color:#ece4cf;
  margin-bottom:12px;
  font-weight:600;
}
.apod-img{
  width:100%;
  border-radius:8px;
  margin-bottom:10px;
  border:1px solid rgba(140,163,204,0.12);
  max-height:250px;
  object-fit:cover;
}
.apod-title{
  font-size:15px;
  color:#ece4cf;
  margin-bottom:4px;
}
.apod-text{
  font-size:13px;
  color:#8895b3;
  line-height:1.45;
}
#notes{
  width:100%;
  height:170px;
  background:rgba(8,11,20,0.6);
  border:1px solid rgba(140,163,204,0.16);
  border-radius:8px;
  color:#d9e1f2;
  padding:12px;
  resize:vertical;
  font-family:inherit;
  font-size:14px;
}
#notes:focus{outline:none;border-color:rgba(232,168,84,0.45)}
.small-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:16px;
}
.iss-val,.people-val{
  font-size:14px;
  color:#ece4cf;
  margin-top:6px;
  line-height:1.5;
}
.loading{color:#5c6b8c;font-size:14px}
.settings-btn{
  display:block;
  margin:24px auto 0;
  padding:10px 22px;
  background:rgba(20,28,51,0.6);
  border:1px solid rgba(140,163,204,0.2);
  border-radius:10px;
  color:#8895b3;
  font-size:14px;
  cursor:pointer;
}
.settings-btn:hover{
  border-color:rgba(232,168,84,0.4);
  color:#ece4cf;
}
.modal-bg{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  z-index:50;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.modal-bg.open{
  display:flex;
}
.modal{
  background:#141c33;
  border:1px solid rgba(140,163,204,0.18);
  border-radius:14px;
  padding:22px;
  width:100%;
  max-width:380px;
  max-height:90vh;
  overflow-y:auto;
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
}
.modal-head h2{
  font-family:'Cormorant Garamond',serif;
  font-size:22px;
  color:#ece4cf;
  font-weight:600;
}
.close-btn{
  background:none;
  border:none;
  color:#8895b3;
  font-size:22px;
  cursor:pointer;
  line-height:1;
}
.field-label{
  display:block;
  font-size:11px;
  letter-spacing:0.08em;
  color:#8895b3;
  margin-bottom:6px;
  margin-top:14px;
}
.field-label .opt{
  color:#e8a854;
  letter-spacing:0;
  text-transform:none;
}
#nameInput,#apiKeyInput{
  width:100%;
  padding:10px 12px;
  background:rgba(8,11,20,0.7);
  border:1px solid rgba(140,163,204,0.18);
  border-radius:8px;
  color:#d9e1f2;
  font-size:14px;
}
#nameInput:focus,#apiKeyInput:focus{
  outline:none;
  border-color:rgba(232,168,84,0.45);
}
.bm-row{
  display:flex;
  gap:8px;
  margin-bottom:8px;
  align-items:center;
}
.bm-row input{
  padding:8px 10px;
  background:rgba(8,11,20,0.7);
  border:1px solid rgba(140,163,204,0.18);
  border-radius:8px;
  color:#d9e1f2;
  font-size:13px;
}
.bm-row input.name{
  width:90px;
  flex-shrink:0;
}
.bm-row input.url{
  flex:1;
  min-width:0;
}
.bm-row .rm{
  background:none;
  border:none;
  color:#8895b3;
  cursor:pointer;
  font-size:16px;
  padding:4px;
}
.add-bm{
  background:none;
  border:none;
  color:#e8a854;
  font-size:13px;
  cursor:pointer;
  margin-top:4px;
  padding:0;
}
.save-btn{
  width:100%;
  margin-top:20px;
  padding:12px;
  background:#e8a854;
  color:#080b14;
  border:none;
  border-radius:10px;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
}
.save-btn:hover{background:#f0c060}
@media(max-width:700px){
  .grid,.small-grid{grid-template-columns:1fr}
  #clock{font-size:40px}
}