/* Global styles */
* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #1e293b;
}

/* Navbar */
nav { display:flex; justify-content:space-between; align-items:center; background:#1e3a8a; color:white; padding:0.8rem 2rem; }
    nav h1{ margin:0;font-size:1.4rem; font-weight:600;}
    nav ul {list-style:none; display:flex; gap:1.5rem; margin:0; padding:0;}
    nav ul li a { text-decoration:none;color:white; font-weight:500; transition:0.3s;}
    nav ul li a:hover{color:#cbd5e1;}
/* Layout */
.container {
  display: flex;
  min-height: calc(100vh - 60px);
}

aside {
  width: 220px;
  background: white;
  padding: 1rem;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

aside h2 {
  text-align: center;
  color: #1e3a8a;
}

.ds-list button {
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #e0f2fe;
  color: #1e3a8a;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ds-list button:hover {
  background: #1e3a8a;
  color: white;
  transform: scale(1.03);
}

main {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

h2 {
  color: #1e3a8a;
  font-weight: 600;
}

/* Input & Operations */
.input-section,
.operations {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  width: 80%;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

input {
  padding: 0.5rem;
  width: 60%;
  margin: 0.5rem 0;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

button {
  background: #1e3a8a;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: #3b82f6;
  transform: translateY(-2px);
}

/* Canvas */
canvas {
  width: 80%;
  min-height: 400px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  background: #1e3a8a;
  color: white;
}

/* Debug messages */
.debug-msg {
  background: #fef08a;
  padding: 1rem;
  border-left: 4px solid #eab308;
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* Hero & Buttons (if needed for home page) */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 5rem;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  color: white;
}

.hero img {
  width: 400px;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.hero-text {
  max-width: 500px;
}

.btn {
  display: inline-block;
  background: white;
  color: #1e3a8a;
  padding: 10px 20px;
  border-radius: 8px;
  margin-top: 1rem;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #93c5fd;
  color: white;
}



/* Responsive adjustments for tablets and phones */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }

  .hero img {
    width: 300px;
    margin-top: 1.5rem;
  }

  .hero-text {
    max-width: 100%;
  }

  nav ul {
    gap: 1rem;
  }

  aside {
    width: 180px;
  }

  .input-section,
  .operations,
  canvas {
    width: 90%;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  nav h1 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .container {
    flex-direction: column;
  }

  aside {
    width: 100%;
    margin-bottom: 1rem;
  }

  main {
    padding: 1rem;
  }

  input {
    width: 80%;
  }

  canvas {
    width: 100%;
    min-height: 300px;
  }

  .btn {
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }

  nav h1 {
    font-size: 1rem;
  }

  nav ul {
    gap: 0.3rem;
  }

  .input-section,
  .operations {
    width: 95%;
    padding: 0.8rem;
  }

  button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  canvas {
    min-height: 200px;
  }

  .hero img {
    width: 100%;
    max-width: 250px;
  }

  .hero {
    padding: 1.5rem 1rem;
  }
}
