body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #0f172a;
  color: #f8fafc;
}

.topnav {
  display: flex;
  justify-content: flex-end;
  padding: 15px 20px;
}

.login-btn {
  text-decoration: none;
  background: #475569;
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 10px;
  transition: background 0.2s ease;
  font-weight: bold;
}

.login-btn:hover {
  background: #64748b;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero {
  text-align: center;
  margin-bottom: 50px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.section-title {
  font-size: 1.8rem;
  margin: 40px 0 20px;
  border-bottom: 2px solid #334155;
  padding-bottom: 10px;
}

.projects {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 10px 4px 20px 4px;
  margin-bottom: 40px;
  scroll-snap-type: x mandatory;
}

/* scrollbar styling */
.projects::-webkit-scrollbar {
  height: 10px;
}

.projects::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 10px;
}

.projects::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 10px;
}

.card {
  display: block;
  text-decoration: none;
  color: white;
  background: #475569;
  border-radius: 14px;
  padding: 20px;
  flex: 0 0 340px;
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  background: #64748b;
}

.card-content {
  padding: 0;
}

.card-source {
  font-size: 0.9rem;
  color: #dbeafe;
  margin-bottom: 8px;
  font-weight: bold;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.5;
}

.honors {
  background: #475569;
  border: none;
  border-radius: 14px;
  padding: 20px;
  margin-top: 30px;
  color: white;
}

.honors ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.honors-grid {
  display: flex;
  gap: 40px;
  justify-content: flex-start;
}


/* LOGIN PAGE */

.login-box {
  width: 100%;
  max-width: 420px;
  background: #475569;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  margin: 100px auto;
}

.login-box h1 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 2rem;
}

.subtitle {
  text-align: center;
  color: #dbeafe;
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border: none;
  border-radius: 10px;
  background: #e2e8f0;
  color: #0f172a;
  box-sizing: border-box;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: #1e293b;
}

.error {
  background: #7f1d1d;
  color: #fecaca;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: #dbeafe;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* CLIENT PAGE */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.topbar h1 {
  margin: 0;
  font-size: 2.2rem;
}

.topbar-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  text-decoration: none;
  background: #475569;
  color: #f8fafc;
  padding: 10px 16px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.button:hover {
  background: #64748b;
}

.intro {
  color: #dbeafe;
  line-height: 1.6;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: #334155;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #475569;
}

th {
  background: #1e293b;
  color: #f8fafc;
}

td {
  color: #e2e8f0;
}

tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

.add-btn {
  background: #1e293b;      /* darker than your current button */
  border: 2px solid #64748b;
}

.add-btn:hover {
  background: #334155;
  border-color: #94a3b8;
}

/* Mobile Table Fix */
.table-wrapper {
  overflow-x: auto;
  padding-bottom: 10px;
}

/* Make table scroll instead of squish */
@media (max-width: 768px) {
  table {
    min-width: 600px;
  }
}

.search-box {
  width: 100%;
  max-width: 300px;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: none;
}

.delete-btn {
  background: #7f1d1d;
  border: 2px solid #dc2626;
  color: #fecaca;
}

.delete-btn:hover {
  background: #dc2626;
  color: white;
}

.action-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.code-window {
  margin-top: 15px;
}

.code-header {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 8px 10px;
  border: 1px solid #64748b;
  border-bottom: none;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.code-preview {
  background: #1e293b;
  border: 1px solid #64748b;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  padding: 12px;
  max-height: 180px;
  overflow: auto;
}


.code-preview pre {
  margin: 0;
}

.code-preview code {
  display: block;
  white-space: pre;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: #e2e8f0;
}


.database-project {
  margin-top: 20px;
}

.project-summary {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 20px;
}

.screenshot-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.screenshot-card {
}

.screenshot-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 12px;
}

.screenshot-card h3 {
  margin: 0 0 8px;
}

.screenshot-card p {
  margin: 0;
  color: #e2e8f0;
}


.project-img {
  width: 100%;
  height: 160px;    
  object-fit: cover;
  border-radius: 6px;
  margin: 6px 0;
}

.projects .card {
  height: 300px;
  overflow: hidden;
}

.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-content p {
  margin-top: 10px;
}
/* Floating Chat Icon */
#chatbot-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #6366f1;
  color: white;
  font-size: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

#chatbot-icon:hover {
  background-color: #4f46e5;
  transform: scale(1.1);
}

/* Chatbot Container */
#chatbot-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 350px;
  height: 450px;
  background-color: #1f1f1f;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Hide Chatbot Initially */
.hidden {
  display: none !important;
}

/* Chatbot Header */
#chatbot-header {
  background-color: #6366f1;
  color: white;
  padding: 15px;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
}

#close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

/* Chatbot Body */
#chatbot-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}

/* Chatbot Messages */
#chatbot-messages {
  display: flex;
  flex-direction: column;
  padding-bottom: 70px; /*creates space for input box */
}

.message {
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 8px;
  max-width: 85%;
}

.message.user {
  background-color: #6366f1;
  color: white;
  align-self: flex-end;
}

.message.bot {
  background-color: #333;
  color: white;
  align-self: flex-start;
}

/* Input Section */
#chatbot-input-container {
  display: flex;
  gap: 8px;
  padding: 10px;
  box-sizing: border-box;
  width: 100%;
  border-top: 1px solid #444;
  background-color: #2c2c2c;
}

#chatbot-input {
  flex: 1;
  border: 1px solid #444;
  border-radius: 10px;
  background-color: #333;
  color: white;
  min-width: 0;
  padding: 0 14px;
}

#send-btn {
  margin-left: 10px;
  padding: 10px 15px;
  background-color: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}

#send-btn:hover {
  background-color: #4f46e5;
}
/* Chatbot conflict fixes */
#chatbot-icon {
  z-index: 9999;
}

#chatbot-container {
  z-index: 10000;
}

#chatbot-input-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

#chatbot-input-container #chatbot-input {
  flex: 1;
  width: auto;
  margin-bottom: 0;
  box-sizing: border-box;
}

#chatbot-input-container #send-btn {
  width: auto;
  margin-left: 0;
  flex-shrink: 0;
}

#chatbot-header #close-btn {
  width: auto;
  padding: 0 8px;
}

#send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#chatbot-input:disabled {
  opacity: 0.7;
}
.section-title {
  border-bottom: 2px solid #6366f1;
}
#suggested-questions {
  display: flex;
  gap: 8px;
  padding: 10px;
  flex-wrap: wrap;
}

.suggestion {
  background: #334155;
  color: #e2e8f0;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.suggestion:hover {
  background: #475569;
}
