:root {
  --primary: #5e35b1;
  --secondary: #4527a0;
  --accent: #7e57c2;
  --light: #f3e5f5;
  --dark: #1a237e;
  --text: #212121;
  --gold: #ffd700;
  --silver: #c0c0c0;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;700&family=Poppins:wght@300;400;600&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #e1e5f0 0%, #b8c6db 100%);
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  background: tuansparent; /* Semi-transparent cream for visibility on dark background */
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  padding: 40px;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.5s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 10px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 2.5rem;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.subheader {
  text-align: center;
  color: var(--secondary);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 500;

}
.headerbox{
  background: white;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

h5 {
  text-align: center;
  color: var(--secondary);
  font-size: 0.8rem;
  margin-bottom: 30px;
  font-weight: 200;
}

.input-area {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}


.input-area:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}
.input-area:hover {
  transform: translateY(-2px);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 400;
  color: var(--secondary);
  font-size: 1.1rem;
}

input, textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s;
  font-family: 'Poppins', sans-serif;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 53, 177, 0.2);
}

/* Update */

/* Specific styling for Bangla Meaning input */
#meaningInput {
  padding: 14px 10px; /* Adjust padding to match original design or preference */
  background-color: #f9f9f9; /* Optional: Differentiate readonly field */
}

#meaningInput::placeholder {
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  color: #757575;
  opacity: 1;
  line-height: 1.5;
}

/* Existing .input-group input rule follows... */
.input-group input {
  width: calc(100% - 150px);
}

.input-group input {
  width: calc(100% - 150px); /* Match wordInput width, accounting for translate button */
}
.input-group:nth-child(2) input {
  width: 100%; /* Ensure meaningInput takes full width of its input-group */
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(94, 53, 177, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(94, 53, 177, 0.4);
}

.btn:hover::after {
  transform: translateX(0);
}

.btn-secondary {
  background: linear-gradient(135deg, #6a1b9a, #8e24aa);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 30px;
  animation: slideUp 0.5s ease-out;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  overflow: hidden;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

th {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #8e24aa;
  padding: 18px;
  text-align: center;
  position: sticky;
  top: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

th:first-child {
  border-top-left-radius: 12px;
}

th:last-child {
  border-top-right-radius: 12px;
}

td {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
  background: white;
  transition: all 0.2s;
  vertical-align: center;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--light);
  transform: scale(1.005);
}

.play-btn {
  background: linear-gradient(135deg, var(--accent), #9575cd);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  display: flex;

  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(126, 87, 194, 0.3);
}

.play-btn:hover {
  background: linear-gradient(135deg, #7e57c2, #673ab7);
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(126, 87, 194, 0.4);
}


.delete-btn:hover {
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(94, 53, 177, 0.4);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.floating-btn:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 30px rgba(94, 53, 177, 0.5);
}

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.translate-btn {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.translate-btn:hover {
  background: linear-gradient(135deg, #388e3c, #1b5e20);
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.4);
}

.accent-selector {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.accent-btn {
  padding: 8px 15px;
  border-radius: 20px;
  border: 2px solid var(--accent);
  background: white;
  color: var(--secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.accent-btn.active {
  background: var(--accent);
  color: white;
}

.accent-btn:hover {
  transform: translateY(-2px);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.notification.error {
  background: #d32f2f;
}

.notification.success {
  background: #43a047;
}

.notification.warning {
  background: #ffa000;
}

.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(50px); }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #757575;
}

.empty-state img {
  width: 150px;
  opacity: 0.7;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  table {
    display: block;
    overflow-x: auto;
  }
  
  .action-buttons {
    flex-direction: column;
  }
}

.pagination-buttons {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}

.pagination-buttons .btn {
  padding: 6px 12px;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
}

.pagination-buttons .btn.active {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(126, 87, 194, 0.3);
}

.pagination-buttons .btn:hover {
  background: var(--accent);
}

.pagination-buttons span {
  color: var(--secondary);
  font-weight: 500;
  margin: 0 10px;
}


.header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background-color: #f6f6f8;
  color: white;
}

.header .logo {
  height: 60px;
  width: auto;
  margin-right: 15px;
}

/* Logo beside title */
.target-score-logo {
  height: 150px;
  width: auto;
  margin-right: 5px;
  vertical-align: middle;
}

/* Watermark background */
.watermark {
  position: absolute;
  top: 65%;
  left: 50%;
  width: 1100px;
  height: 1100px;
  background: url("img/logo-noBG.png") no-repeat center/contain;
  opacity: 0.1;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

/* Ensure watermark stays behind content */
.container {
  position: relative;
  z-index: 1;
}

.footer {
  background: transparent;
  color: rgb(0, 0, 0);
  padding: 30px 20px;
  border-radius: 20px 20px 0 0;
  margin-top: 50px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: auto;
  gap: 20px;
}

.footer-logo {
  position: absolute;
  height: 90px;
  margin-top: -6%;
}

.footer-links a {
  color: #87029c;
  text-decoration: none;
  margin: 0 12px;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-right {
  text-align: right;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-right {
    text-align: center;
  }
}

/* Tablets (up to 1024px) */
@media (max-width: 1024px) {
  h1 {
    font-size: 2rem;
  }
  .target-score-logo {
    height: 100px;
  }
  .container {
    padding: 25px;
  }
  input, textarea {
    font-size: 15px;
    padding: 12px 14px;
  }
  .btn, .play-btn, .translate-btn {
    font-size: 15px;
    padding: 10px 18px;
  }
}

/* Mobile (up to 600px) */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 1rem;
    text-align: center;
  }

  .subheader {
    font-size: 0.5rem;
  }

  .container {
    padding: 10px;
    border-radius: 7px;
  }

  .input-group {
    flex-direction: column !important;
  }

  .input-group div {
    flex-direction: column !important;
  }

  input, textarea {
    width: 100% !important;
    font-size: 10px;
    padding: 9px 0;
  }

  .btn, .play-btn, .translate-btn {
    width: 100%;
    font-size: 10px;
    padding: 9px 0;
  }

  /* Table responsive cards */
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead tr {
    display: none; /* hide header row */
  }
  tr {
    margin-bottom: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.05);
  }
  td {
    border: none;
    padding: 6px 10px;
    position: relative;
    text-align: left;
  }
  td::before {
    content: attr(data-label);
    font-weight: 500;
    display: inline-block;
    width: 120px;
  }

  .watermark {
    width: 400px;
    height: 400px;
    top: 60%;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-logo {
    height: 50px;
    margin: -35px;
    
  }

  .footer-links a {
    display: block;
    margin: 5px 0;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
    font-size: 22px;
    bottom: 20px;
    right: 20px;
  }
}
