/* General */
body {
  font-family: Arial, sans-serif;
  background: #0b0f19;
  color: #e6e6e6;
  margin: 0;
  padding: 0px;
}

.title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #ffffff;
}

/*Header Layout*/
header {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(120deg, #1b2735, #090a0f);
  border-bottom: 3px solid #00d4ff;
}

header h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, #00d4ff, #66ffe6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}

header p {
  font-size: 1.1rem;
  color: #d0d8e0;
}

/* Sections */
section {
  padding: 3rem 1.5rem;
  margin: 0 auto;
  max-width: 1000px;
}

section h2 {
  font-size: 2rem;
  color: #00d4ff;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #00d4ff;
  margin: 0.5rem auto 1.5rem auto;
  border-radius: 2px;
}

section p, section li {
  font-size: 1.05rem;
  color: #cfd8e3;
  line-height: 1.6;
}

.container {
  background: #161c29;
  border: 1px solid #2a3549;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* About Section */
#about p {
  text-align: center;
  max-width: 700px;
  margin: auto;
}

/* Resources Section */
#resources .container {
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 500px;
}

/* Features Section */
#features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#features li {
  margin: 12px 0;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#features li:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

/* Contact Section */
#contact p {
  text-align: center;
}

#contact a {
  color: #00e6ff;
  text-decoration: none;
  font-weight: bold;
}

#contact a:hover {
  text-decoration: underline;
  color: #66ffe6;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  background: #0a0f1a;
  border-top: 2px solid #1f2a3d;
  font-size: 0.9rem;
  color: #8a97ab;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}

/* Card Style */
.card {
  background: #1b2230;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  border: 1px solid #2d3b50;
}
.card:hover {
  background: #253349;
  transform: scale(1.05);
}

.note-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 1s ease;
}

.note-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.note-card h3 {
  color: #00d4ff;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

/*Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
#popup-title {
  font-size: 2rem;
}

.hidden {
  display: none;
}
.popup-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}
.popup-content {
  text-align: center;
  background: #141a24;
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  height: 85%;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* Buttons */
.btn {
  display: inline-block;
  margin: 10px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background: #0077ff;
  color: white;
  transition: 0.3s;
}
.btn:hover {
  background: #3399ff;
}

.btn-download {
  background: #00b56a;
}
.btn-download:hover {
  background: #00e68a;
}

.image-container {
  width: 100%;
  max-width: 600px; /* optional: limits width */
  margin: auto;
  overflow-y: auto;
}
.image-container img {
  width: 100%;   /* fits to screen width */
  height: auto;  /* keeps aspect ratio */
  display: block;
}

/* Fullscreen Image Popup */
#img-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 10, 1);
  display: none;
  justify-content: center;   /* center horizontally */
  align-items: flex-start;   /* 👈 stick to top */
  z-index: 1000;
  overflow-y: auto;          /* allow scrolling */
  box-sizing: border-box;
}

#img-popup .img-popup-body {
  display: flex;
  justify-content: center;
  width: 100%;
}

#img-popup img {
  max-width: 100%;     /* responsive */
  height: auto;        /* keep aspect ratio */
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

#img-popup .img-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1000px;
}

#img-popup h2 {
  color: #00d4ff;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.5rem;
  padding: 10px 20px;
}

.close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: #ff5757;
  cursor: pointer;
  z-index: 1100;
}

#img-popup .close:hover {
  color: #ff1c1c;
}

/* Search Bar */
.search-container {
  text-align: center;
  margin: 2rem 0;
}

.search-container input {
  width: 80%;
  max-width: 450px;
  padding: 12px 18px;
  border: 2px solid #00e6ff66;
  border-radius: 30px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 1rem;
  outline: none;
  transition: 0.3s;
}

.search-container input::placeholder {
  color: #94a3b8;
}

.search-container input:focus {
  border-color: #00e6ff;
  box-shadow: 0 0 12px rgba(0, 230, 255, 0.5);
}

/* Results Grid */
.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

.search-results .note-card {
  background: #1b2230;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  transition: 0.3s;
}

.search-results .note-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.search-results img {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
}
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#dataBox {
  width: 300px;
  min-height: 100px;
  border: 1px solid #ddd;
  padding: 20px;
  text-align: center;
}