/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html[data-theme="light"] {
  background: #ffffff;
  color: #000000;
}

html[data-theme="dark"] {
  background: #121212;
  color: #ffffff;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow-x: hidden;
}

/* Header */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eee;
  background-color: inherit;
}

.logo img {
  height: 60px;
  width: auto;
  border-radius: 8px;
}

/* Dark mode toggle container */
.top-right-tools {
  display: flex;
  align-items: center;
  margin-left: auto;
}

/* Boxicons Sun/Moon Toggle */
.theme-togglers {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 22px;
  gap: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.theme-toggler {
  display: none;
  font-size: 22px;
  transition: transform 0.4s ease, color 0.3s ease;
}

.theme-toggler:hover {
  transform: scale(1.3) rotate(15deg);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

html[data-theme="light"] #moonIcon {
  display: inline;
  color: #444;
}

html[data-theme="dark"] #sunIcon {
  display: inline;
  color: #ffd700;
}

html[data-theme="dark"] .theme-togglers {
  background-color: #2a2a2a;
}

html[data-theme="light"] .theme-togglers {
  background-color: #f1f1f1;
}

/* Navbar */
.navbar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.navbar a {
  color: #007BFF;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.navbar a:hover {
  text-decoration: underline;
}

/* Main Wrapper */
.wrapper {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  padding: 20px;
  min-height: calc(100vh - 120px);
  overflow: hidden;
}

/* Calculator Box */
.calculator-box {
  width: 100%;
  max-width: 450px;
  background: #fdfdfd;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: 0.3s ease;
}

html[data-theme="dark"] .calculator-box {
  background: #1e1e1e;
  border-color: #333;
}

/* Inputs & Selects */
.sgpa-input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
  text-align: center;
  background: #fff;
  color: #000;
}

html[data-theme="dark"] .sgpa-input,
html[data-theme="dark"] .custom-select {
  background: #2a2a2a;
  color: #fff;
  border-color: #444;
}

.sgpa-input::placeholder {
  color: #666;
}

.custom-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

/* Buttons */
button {
  background-color: #007BFF;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  margin: 10px 5px;
  width: 48%;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

button:last-of-type {
  background-color: #dc3545;
}

button:last-of-type:hover {
  background-color: #b02a37;
}

/* Results */
.result {
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
}

/* Performance Summary */
.performance {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

/* Progress Bar */
.sgpa-bar-container {
  width: 100%;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  margin-top: 20px;
  overflow: hidden;
}

.sgpa-bar {
  height: 100%;
  width: 0%;
  background-color: #28a745;
  transition: width 0.5s ease-in-out, background-color 0.3s;
}

/* Table */
table {
  border-collapse: collapse;
  margin-top: 10px;
  width: 100%;
}

table, th, td {
  border: 1px solid #ccc;
}

th, td {
  padding: 10px;
  font-size: 15px;
}

th {
  background-color: #f1f1f1;
}

html[data-theme="dark"] th {
  background-color: #2e2e2e;
}

/* Footer */
.footer {
  text-align: center;
  padding: 15px;
  font-size: 14px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

.footer .heart {
  color: red;
}

.footer a {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

html[data-theme="dark"] .footer {
  background: #1a1a1a;
  border-color: #333;
}

/* Social Icons */
.socials {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.socials img {
  width: 32px;
  height: 32px;
  transition: transform 0.2s;
}

.socials img:hover {
  transform: scale(1.1);
}

/* Emoji Rain */
.emoji-drop {
  position: fixed;
  top: -50px;
  font-size: 2rem;
  animation: fall 3s linear forwards;
  z-index: 999;
  pointer-events: none;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .logo img {
    height: 40px;
  }

  .navbar {
    gap: 10px;
    justify-content: flex-end;
  }

  .navbar a {
    font-size: 14px;
  }

  button {
    font-size: 14px;
    padding: 10px;
    width: 100%;
  }

  .calculator-box {
    padding: 20px;
  }

  .theme-toggler {
    font-size: 20px;
  }
}
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}
