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

body {
  background-image: url('images/background2.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  font-family: 'Segoe UI', sans-serif;
  color: #1f2937;
  line-height: 1.6;
  position: relative;
  padding-top: 60px;
}

.overlay {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
}

/* Header */
header {
  background-color: #1e3a8a;
  color: white;
  padding: 30px 0;
  text-align: center;
}

header h1 {
  font-size: 2.2em;
  margin-bottom: 5px;
}

header p {
  font-size: 1.1em;
  color: #e0e7ff;
}

/* Navigation Bar */
nav {
  background-color: #1e40af;
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 30px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  transition: background 0.3s, color 0.3s;
  border-radius: 5px;
}

nav ul li a:hover {
  background-color: #3b82f6;
  color: white;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  transition: top 0.3s ease;
}

/* Main content */
main {
  padding: 40px 20px;
  max-width: 900px;
  margin: auto;
}

/* Section Styles */
section {
  margin-bottom: 50px;
}

h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #1e3a8a;
}

/* App List */
#apps ul {
  list-style-type: none;
  padding-left: 0;
}

#apps li {
  margin-bottom: 15px;
  font-size: 1.1em;
}

#apps a {
  color: #2563eb;
  text-decoration: none;
}

#apps a:hover {
  text-decoration: underline;
}

/* Chat Section */
#chatbox {
  background: #e0f2fe;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

#chat-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#messages {
  background: white;
  height: 220px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.user-message {
  text-align: right;
  color: #1d4ed8;
  margin-bottom: 5px;
}

.bot-message {
  text-align: left;
  color: #059669;
  margin-bottom: 5px;
}

.chat-input {
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.chat-input button {
  padding: 10px 20px;
  font-size: 16px;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.chat-input button:hover {
  background: #1d4ed8;
}

.profile-photo-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.profile-photo {
  width: 220px;         /* adjust to your liking */
  height: 220px;
  border-radius: 50%;   /* makes it circular */
  object-fit: cover;    /* ensures it stays centered/cropped nicely */
  border: 5px solid #1e3a8a; /* matches your site’s navy-blue theme */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05); /* subtle zoom on hover */
}

@media (max-width: 600px) {
  .profile-photo {
    width: 150px;
    height: 150px;
  }
}


/* About / Contact */
#about, #contact {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.contact-section input[type="text"],
.contact-section input[type="email"],
.contact-section textarea {
  width: 100%;
  padding: 10px;
  margin: 8px 0 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.contact-section label {
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

.contact-section button.quiz-button {
  background-color: #1e40af;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-section button.quiz-button:hover {
  background-color: #374bd3;
}


/* Footer */
footer {
  background-color: #1e3a8a;
  color: white;
  text-align: center;
  padding: 25px;
  margin-top: 40px;
  font-size: 0.95em;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .chat-input {
    flex-direction: column;
  }

  .chat-input input,
  .chat-input button {
    width: 100%;
  }
}

/* 🎨 Fun Quizzes Styling */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.quiz-card {
  background: #ffffffcc;
  backdrop-filter: blur(5px);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 2px solid #e5e7eb;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.quiz-card h3 {
  margin-bottom: 10px;
  font-size: 1.4em;
  color: #1e40af;
}

.quiz-card p {
  color: #334155;
  font-size: 0.95em;
  margin-bottom: 15px;
}

/* 💡 ANSWER BUTTONS: Vertical alignment and full-width */
#choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

#choices .quiz-button {
  display: inline-block; /* allow sizing based on content */
  max-width: 100%; /* prevent overflow */
  text-align: left;
  padding: 12px 16px;
  font-size: 16px;
  background-color: #1e40af;
  color: white;
  border: none;
  border-radius: 6px;
  transition: background 0.3s;
  cursor: pointer;
  word-wrap: break-word; /* optional: wraps long words */
}


#choices .quiz-button:hover {
  background-color: #2563eb;
}

/* Generic Quiz Buttons (Next, Restart) */
.quiz-button {
  display: inline-block;
  background-color: #1e40af;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
  margin: 8px;
  font-size: 16px;
  cursor: pointer;
}

.quiz-button:hover {
  background-color: #2563eb;
}

/* Timer Display */
#timer {
  font-size: 18px;
  color: #444;
  margin-bottom: 10px;
}
/* 🎯 Style the NEXT button to be bigger and colorful */
#next-btn {
  background-color: #10b981; /* Emerald green */
  color: white;
  font-size: 18px;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  margin-top: 20px;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#next-btn:hover {
  background-color: #059669; /* darker green on hover */
  transform: scale(1.05); /* subtle zoom effect */
  cursor: pointer;
}
/* Wrap nav items and search bar in one row */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 20px;
}

/* Style the search bar */
#search-form {
  display: flex;
  align-items: center;
}

#search-input {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px 0 0 4px;
  border: 1px solid #cbd5e1;
  outline: none;
}

#search-form button {
  padding: 6px 10px;
  font-size: 14px;
  background-color: #1e40af;
  color: white;
  border: 1px solid #1e40af;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

#search-form button:hover {
  background-color: #2563eb;
}
#contact-form {
  display: none;
}
/* Smooth toggle for contact form */
#contact-form {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.6s ease;
}

#contact-form.show {
  display: block;
  opacity: 1;
  max-height: 800px; /* enough for the full form */
}
#about p {
  margin-bottom: 16px;
  font-size: 1.05em;
}

#about a {
  color: #1e40af;
  text-decoration: underline;
}

#about a:hover {
  color: #2563eb;
}
#Programmer ul {
  margin-left: 20px;
  margin-bottom: 20px;
  list-style-type: square;
}

#Programmer li {
  margin-bottom: 8px;
}

#Programmer h3 {
  margin-top: 20px;
  color: #1e40af;
}
/* Mobile nav toggle styles */
.hamburger {
  background: none;
  font-size: 28px;
  color: white;
  border: none;
  cursor: pointer;
  display: none;
}

/* Make nav-links responsive */
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .hamburger {
    cursor: pointer;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    display: none;
    background-color: #1e40af;
    padding: 15px 0;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    text-align: center;
    padding: 10px 0;
  }
}

main {
  margin-top: 60px; 
}

/* Smooth animated sub-panels */
.sub-content {
  /* we'll force display:block via JS to beat any !important conflicts */
  max-height: 0;
  overflow: hidden;
  padding: 0 15px;                 /* collapsed: no vertical padding */
  border-left: 3px solid #007acc;
  background: #f9f9f9;
  margin-bottom: 10px;
  transition: max-height 0.45s ease, padding 0.3s ease;
}


.sub-content.active {
  padding: 10px 15px;
}

.sub-collapsible {
  background-color: #e8f4fd;
  color: #333;
  cursor: pointer;
  padding: 12px;
  width: 100%;
  border: none;
  text-align: left;
  font-size: 1em;
  margin: 6px 0;
  outline: none;
  transition: background-color 0.3s;
}
.sub-collapsible:hover { background-color: #d0e9ff; }
.sub-collapsible.active { background-color: #cce6ff; font-weight: bold; }

table {
  border: 1px solid #ccc;
  border-collapse: collapse;
  margin-top: 10px;
}

td, th {
  border: 1px solid #ccc;
  padding: 6px 10px;
}
