/* FONTS */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background-color: #0b1f3a; /* navy background */
  color: #ffffff;
}

/* HEADER */
header {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: #0b1f3a;
  border-bottom: 1px solid #1a3a6e;
}
header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 0;
}

/* NAVIGATION */
nav {
  margin-top: 1rem;
}
nav button {
  padding: 0.5rem 1.5rem;
  margin: 0 0.3rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 600;
  transition: 0.3s;
}
nav button.active, nav button:hover {
  background: #ffffff;
  color: #0b1f3a;
  font-weight: 700;
}

/* MAIN WRAPPER */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* TAB CONTENT */
.tab {
  display: none;
  transition: opacity 0.4s ease-in-out;
  opacity: 0;
}
.tab.active {
  display: block;
  opacity: 1;
}

/* NEWS STYLES */
#searchNews {
  width: 100%;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  border-radius: 30px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: #1a3a6e;
  color: white;
}
#searchNews::placeholder { color: #b0c4de; }

#articles-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.article {
  background-color: #0d2b50;
  padding: 1.2rem;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  border: 1px solid #1a3a6e;
  transition: transform 0.2s, background 0.3s;
}
.article:hover {
  transform: translateY(-5px);
  background-color: #1a3a6e;
}
.article h2 { 
  margin: 0 0 0.5rem 0; 
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
}
.article p { font-size: 0.95rem; color: #d0d0d0; }
.article a { color: #89cff0; text-decoration: none; }
.article a:hover { text-decoration: underline; }

/* LEARN STYLES */
.booklet {
  background-color: #0d2b50;
  padding:1.2rem;
  border-radius:15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  margin-bottom: 1rem;
  border: 1px solid #1a3a6e;
}
.booklet h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}
.booklet p { font-size: 0.95rem; color: #d0d0d0; }
.animation { width:100%; height:220px; margin:0.5rem 0; }

/* SUMMARIZER STYLES */
textarea {
  width:100%;
  height:160px;
  padding:0.7rem 1rem;
  border-radius:30px;
  border:none;
  outline:none;
  font-size:1rem;
  background: #1a3a6e;
  color:white;
}
textarea::placeholder { color: #b0c4de; }

button#summarizeBtn {
  padding:0.7rem 1.5rem;
  background: #ffffff;
  color:#0b1f3a;
  border:none;
  border-radius:30px;
  cursor:pointer;
  font-size:1rem;
  margin-top:0.5rem;
  font-weight:600;
  transition:0.3s;
}
button#summarizeBtn:hover { background:#e0e0e0; }

#output {
  background: #0d2b50;
  padding:1.2rem;
  border-radius:15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  margin-top:1rem;
  white-space: pre-line;
  border: 1px solid #1a3a6e;
  color: #d0d0d0;
}

/* MOBILE RESPONSIVE */
@media(max-width:600px){
  .article h2 { font-size:1.1rem; }
  .article p { font-size:0.85rem; }
  .booklet h2 { font-size:1.2rem; }
  .booklet p, #output { font-size:0.85rem; }
  .animation { height:160px; }
  header h1 { font-size:1.5rem; }
  nav button { font-size:0.85rem; padding:0.4rem 0.9rem; }
}
