/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f4f6f8;
  color: #2c3e50;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Container */
.container {
  background: #ffffff;
  padding: 32px;
  max-width: 100%;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  margin: auto;
}

/* Make sure <body> uses full width */
body {
  font-family: 'Inter', sans-serif;
  background: #f4f6f8;
  color: #2c3e50;
  padding: 20px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}


/* Headings */
h1, h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

/* Form Layout */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
}

form input[type="text"],
form input[type="date"] {
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 220px;
  transition: border-color 0.2s;
}

form input:focus {
  border-color: #007bff;
  outline: none;
}

form button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

form button:hover {
  background-color: #0056b3;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}

th, td {
  text-align: center;
  padding: 12px 8px;
  border-bottom: 1px solid #e6e9ec;
}

th {
  background-color: #f1f3f5;
  font-weight: 600;
}

/* Table Row Hover */
tbody tr:hover {
  background-color: #f9fbfd;
}

/* Buttons in Table */
button.edit,
button.delete,
button.copy {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  color: white;
}

button.edit {
  background: #ffc107;
}

button.edit:hover {
  background: #e0a800;
}

button.delete {
  background: #dc3545;
}

button.delete:hover {
  background: #c82333;
}

button.copy {
  background: #17a2b8;
  margin-top: 10px;
}

button.copy:hover {
  background: #138496;
}

/* Checkbox */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #28a745;
}

/* Output Box */
.output {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.6;
  box-shadow: inset 0 0 5px rgba(200, 200, 200, 0.2);
}

/* Beautiful Notification Below Clock */
.notification {
  display: none;
  margin: 10px auto 20px;
  max-width: 500px;
  background-color: #eafaf1;
  color: #2e7d32;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  animation: fadeSlide 0.4s ease;
  transition: all 0.4s ease;
}

.notification.show {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode adjustment */
body.dark .notification {
  background-color: #273c2c;
  color: #a5d6a7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}


/* Footer */
.developer-sign {
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: #666;
}

.developer-sign a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.developer-sign a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 20px 10px;
  }

  .container {
    padding: 20px;
    border-radius: 10px;
  }

  form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  form input[type="text"],
  form input[type="date"],
  form button {
    max-width: 100%;
    width: 100%;
  }

  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  td {
    text-align: left;
    padding: 8px 5px;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #555;
  }

  .output {
    font-size: 13px;
  }

  .copy {
    width: 100%;
  }

  .developer-sign {
    font-size: 12px;
  }
}


form textarea {
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 100%;
  resize: vertical;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}
form textarea:focus {
  border-color: #007bff;
  outline: none;
}

/* Theme: Dark Mode */
body.dark {
  background: #121212;
  color: #e0e0e0;
}

body.dark .container {
  background: #1e1e1e;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

body.dark h1,
body.dark h2,
body.dark label {
  color: #ffffff;
}

body.dark input,
body.dark textarea,
body.dark select {
  background-color: #2a2a2a;
  color: #f0f0f0;
  border-color: #444;
}

body.dark input:focus,
body.dark textarea:focus {
  border-color: #66afe9;
}

body.dark table {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

body.dark th {
  background-color: #2a2a2a;
}

body.dark tbody tr:hover {
  background-color: #2c2c2c;
}

body.dark .output {
  background-color: #252525;
  color: #f0f0f0;
  box-shadow: inset 0 0 5px rgba(100, 100, 100, 0.2);
}

body.dark .developer-sign {
  color: #aaa;
}

body.dark .developer-sign a {
  color: #66afe9;
}

body.dark .notification {
  background-color: #28a745; /* You can override dynamically with JS */
}

/* Toggle Switch */
.theme-toggle {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.theme-label {
  font-weight: 600;
  font-size: 14px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #007bff;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Digital Clock with Date */
.clock-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.digital-clock {
  font-family: 'Courier New', Courier, monospace;
  font-size: 28px;
  background: #000;
  color: #00ffcc;
  padding: 14px 24px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,255,204,0.6);
  text-align: center;
}

.clock-date {
  font-size: 14px;
  color: #cccccc;
  margin-top: 8px;
}

body.dark .digital-clock {
  background: #222;
  color: #00ffe1;
  box-shadow: 0 0 10px rgba(0,255,255,0.6);
}

body.dark .clock-date {
  color: #999999;
}

.edit-input {
  width: 100%;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: inherit;
}
.edit-input:focus {
  border-color: #007bff;
  outline: none;
}


@media (max-width: 768px) {
  form {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  form input,
  form textarea,
  form button {
    width: 100%;
    max-width: 100%;
  }

  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }

  td {
    text-align: left;
    padding: 10px 6px;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #555;
  }

  .output {
    font-size: 13px;
  }

  .copy,
  .notification {
    width: 100%;
    box-sizing: border-box;
  }

  .developer-sign {
    font-size: 12px;
  }
}

tr.celebrate {
  animation: glowDone 1.2s ease-in-out;
  background-color: #d4edda !important;
}

@keyframes glowDone {
  0% {
    box-shadow: 0 0 0 rgba(0,255,0,0);
  }
  50% {
    box-shadow: 0 0 20px rgba(40,167,69,0.8);
  }
  100% {
    box-shadow: 0 0 0 rgba(0,255,0,0);
  }
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 150px;
  height: auto;
  border-radius: 12px;
}

/* Logo Container */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* Logo Image */
.logo {
  max-width: 150px;
  height: auto;
}

/* Left-Right Rotate Animation */
.animated-logo {
  animation: rotateWiggle 2s infinite ease-in-out;
  transform-origin: center;
}

@keyframes rotateWiggle {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(15deg); }
  50%  { transform: rotate(-15deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}
