* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #46cb8f;
}

/* dark and light theme */

body.dark {
  --bg: #111111;
  --surface: #171717;
  --surface-hover: #212121;
  --text: #ffffff;
  --text-muted: #a5a5a5;
  --border: #2b2b2b;
  --glass: rgba(20, 20, 20, 0.45);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

body.light {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-hover: #f0f0f0;
  --text: #111111;
  --text-muted: #a5a5a5;
  --border: #dddddd;
  --glass: rgba(255, 255, 255, 0.55);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* background */

.background {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  transition: filter 0.35s ease, transform 0.35s ease;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* hero */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* clock */

.clock-section {
  text-align: center;
  margin-bottom: 55px;
  transition: 0.35s ease;
}

#clock {
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 700;
  letter-spacing: -5px;
  line-height: 1;
  color: #f0f0f0;
}

#date {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* search */

.search-section {
  width: min(680px, 90vw);
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-container:hover {
  border-color: var(--accent);
}

.search-container:focus-within {
  transform: scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(70, 203, 143, 0.3), 0 15px 40px rgba(0, 0, 0, 0.35);
}

#engine-button {
  width: 58px;
  height: 58px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 16px;
  transition: 0.2s;
}

#engine-button:hover {
  background: rgba(255, 255, 255, 0.05);
}

#engine-icon {
  width: 26px;
  height: 26px;
}

#search-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  padding-right: 20px;
}

#search-input::placeholder {
  color: var(--text-muted);
}

/* favorites */

.favorites {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  transition: 0.35s ease;
}

.favorite {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.favorite i {
  width: 46px;
  height: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: 0.25s;
}

.favorite:hover i {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.favorite span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* responsivenesss */

@media (max-width: 600px) {
  .favorites {
    gap: 18px;
  }

  .favorite i {
    width: 42px;
    height: 42px;
  }
}

/* search engine dropdown selector */

.dropdown {
  position: absolute;
  top: 70px;
  left: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 100;
}

.dropdown button {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: 0.2s;
}

.dropdown button:hover {
  background: var(--surface-hover);
}

.dropdown img {
  width: 22px;
  height: 22px;
}

.hidden {
  display: none;
}

/* apod info button  */
.apod-button {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 42px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  text-decoration: none;
  color: white;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.25s ease;
  z-index: 1000;
}

.apod-button:hover {
  background: var(--accent);
  border-color: var(--border);
}

/* experimenting with background changes */
body.search-active .background {
  filter: brightness(0.5) blur(10px);
}

body.search-active .clock-section,
body.search-active .favorites,
body.search-active .apod-button {
  opacity: 0.1;
  transform: translateY(-4px);
}

body.search-active .search-container {
  transform: translateY(-100px) scale(1.1);
  box-shadow: 0 0 100px var(--accent);
}

/* settings panel */
#settings-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.25s;
  z-index: 1000;
}

#settings-button:hover {
  transform: rotate(45deg);
}

#settings-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 300px;
  padding: 24px;
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(25px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  z-index: 999;
}

.setting-group {
  margin-top: 22px;
}

.setting-group h3 {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.accent-picker {
  display: flex;
  gap: 12px;
}

.accent {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: 0.25s;
}
.accent:hover {
  transform: scale(1.1);
  transition: 0.25s;
}

.accent:focus-within {
  transform: scale(1.1);
  transition: 0.25s;
  border: 1px solid var(--border);
}

/* accents */
.accent:nth-child(1) {
  background: #46cb8f;
}
.accent:nth-child(2) {
  background: #4f8ef7;
}
.accent:nth-child(3) {
  background: #b26cff;
}
.accent:nth-child(4) {
  background: #ff914d;
}
.accent:nth-child(5) {
  background: #ff5e7e;
}

.theme-btn {
  width: 100%;
  padding: 12px 16px;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s;
}

.theme-btn:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.theme-btn:active {
  transform: scale(0.98);
}

/* news section*/

.news-section {
  min-height: 100vh;
  padding: 80px 8%;
  background: var(--bg);
}

.news-header {
  margin-bottom: 40px;
}

.news-header h2 {
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 8px;
}

.news-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

#news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.news-content h3 {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 600;
}

.news-content p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.news-footer {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

.news-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.news-tab {
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;

  transition: 0.25s;

  border: 1px solid var(--border);
}

.news-tab:hover {
  border-color: var(--accent);
}

.news-tab.active {
  background: var(--accent);

  color: white;

  border-color: var(--accent);
}


/* made by part */

.madeby{
  position: absolute;
  bottom:24px;
  left:24px;
  display:flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  color:var(--text-muted);
  font-size:.85rem;
  opacity:.7;
  transition:.25s;
  z-index:1000;
}

.madeby span{
  color:var(--accent);
}