#dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

body.dark-mode .contact-section {
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%) !important;
  color: #f0f0f0;
}

body.dark-mode .contact-section a {
  color: #9ecbff;
}

body.dark-mode .contact-section a:hover {
  color: #c0e8ff;
}

body.dark-mode a {
  color: #9ecbff;
}

body.dark-mode {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode .hero {
  background: #1e1e1e; 
  color: #f0f0f0; 
}

body.dark-mode .section,
body.dark-mode .grid-section {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode .card {
  background-color: #222;
  color: #f0f0f0;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode .card a {
  color: #66aaff;
}

body.dark-mode .card a:hover {
  color: #88c0ff;
}

body.dark-mode .section-title {
  color: #f0f0f0;
}

body.dark-mode .card-desc {
  color: #e0e0e0;
}

body {
  background-color: #fafafa;
  color: #333;
  padding: 0;
  margin: 0;
}

.container {
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  margin-top: 1rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 4rem 1rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.grid-section {
  padding: 4rem 1rem;
  background: #f0f4ff;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

/* Card Styling */
.card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  max-width: 320px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.03);
}

.card img {
  width: 100%;
  height: auto;
}

.card a {
  display: block;
  text-align: center;
  padding: 1rem;
  font-weight: 600;
  color: #0056b3;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
  color: #003e7a;
  text-align: center;
}

.card-img {
  width: 100%;
  margin-bottom: 1rem;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-color, #333);
  text-align: center;
  margin: 0 auto;  
  padding: 0 0.5rem;
  line-height: 1.4;
  max-width: 90%;
}

/* Link box styling */
.link-box a {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #0056b3;
  text-decoration: none;
  transition: all 0.3s ease;
}

.link-box a:hover {
  color: #003d80;
  text-decoration: underline;
}

/* Scribble hover effect */
.scribble-link {
  position: relative;
  color: #1c1c1c;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.scribble-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.1em;
  width: 100%;
  height: 0.4em;
  background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/78779/scribble-circle.svg') no-repeat center;
  background-size: contain;
  opacity: 0;
  transform: scaleX(0.6);
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.contact-section {
  background: linear-gradient(135deg, #f0f4ff 0%, #e4ebff 100%);
  padding: 4rem 1rem;
}

.contact-section .section-title {
  color: #1a1a1a;
}

.contact-section a {
  color: #0056b3;
  text-decoration: none;
  font-weight: 500;
}

.contact-section a:hover {
  color: #003d80;
  text-decoration: underline;
}

.scribble-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.top-button-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
}

.top-button-container button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.top-button-container button:hover {
  transform: scale(1.2);
}

@media (max-width: 600px) {
  .top-button-container {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.25rem;
  }

  .top-button-container button {
    font-size: 1rem;
    padding: 0.25rem;
    color: inherit;
  }
}
#chat-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #1e1e1e;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.3s ease;
}

#chat-toggle:hover {
  transform: scale(1.15);
}

#chat-window {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  width: 320px;
  max-height: 400px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

#chat-window.open {
  display: flex;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e9e9e9;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
}

.chat-header button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-options {
  padding: 1rem;
  border-top: 1px solid #ddd;
}

.chat-button {
  background-color: #007bff;
  color: white;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.chat-button:hover {
  background-color: #0056b3;
}

body.dark-mode #chat-window {
  background: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
}

body.dark-mode .chat-header {
  background: #333;
  color: #f0f0f0;
  border-bottom: 1px solid #444;
}

body.dark-mode .chat-header button{
  background: none;
  color: #f0f0f0;
}

body.dark-mode .chat-messages a {
  color: #9ecbff;
}

body.dark-mode .chat-button {
  background-color: #2563eb; 
  color: white;
}

body.dark-mode #chat-toggle {
  background: #f0f0f0;   
  color: #1e1e1e;         
}

.game-options {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.game-options li {
  background: #e0e7ff;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.game-options li:hover {
  background: #c7d2fe;
}

body.dark-mode .game-options li {
  background: #374151; /* slate-700 */
  color: #f0f0f0;
}

body.dark-mode .game-options li:hover {
  background: #4b5563; /* slate-600 */
}

@media (max-width: 600px) {
  .hero {
    padding: 2.5rem 1rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
    text-align: center;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 90%;
    margin: 1rem auto 0;
    padding: 0 0.5rem;
    text-align: center;
  }

  .hero p a {
    display: inline-block;
    word-break: break-word;
  }
}

