:root {
  --primary-color: #68E4ED;
  --secondary-color: #F7EA62;
  --text-color: #000000;
  --accent-color: #0F172A;
  --footer-bg: #141620;
  --social-btn-color: #fcb900;
  font-family: 'Poppins', sans-serif;
}

.primary-bg {
  background-color: var(--primary-color);
}

.secondary-bg {
  background-color: var(--secondary-color);
}

.primary-text {
  color: var(--primary-color);
}

.accent-text {
  color: var(--accent-color);
}

.text-default {
  color: var(--text-color);
}

/* Navbar */
header {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
  z-index: 30;
}

/* Mobile Menu */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  padding: 1rem 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu-hidden {
  display: none !important;
}

#mobile-menu .nav-link-item {
  display: block;
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  color: var(--accent-color);
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

#mobile-menu .nav-link-item:active {
  background-color: #f0f9ff;
  transform: scale(0.98);
}

#mobile-menu .nav-link-item:hover {
  background-color: #f8fafc;
}

#mobile-menu .join-now-btn {
  margin-top: 1rem;
  width: calc(100% - 3rem);
  margin-left: 1.5rem;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  border-radius: 9999px;
}

/* Footer */
.footer-link {
  transition: color 0.15s;
  line-height: 2.5;
  margin: 0;
  color: var(--accent-color);
  text-align: left;
}

.footer-link:hover {
  color: var(--primary-color);
}

.social-icon-btn {
  background-color: var(--social-btn-color);
  color: var(--accent-color);
  transition: opacity 0.15s;
}

.social-icon-btn:hover {
  opacity: 0.8;
}

.footer-logo-img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

* {
  box-sizing: border-box;
}

body {
  background: #ffffff;
  font-family: 'Poppins', sans-serif;
  color: #111827;
  margin: 0;
  min-height: 100vh;
  padding: 0;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Form Container - New styled card */
.form-container {
  max-width: 500px;
  margin: 0 auto 3rem;
  background: #ffffff;
  /* White background */
  color: #141620;
  /* Dark footer color for text */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  padding: 1.5rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  /* Lighter shadow */
  border: 1px solid #e5e7eb;
  /* Light border */
}

#shorten-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0;
}

.shorten-input,
#url-input,
#code-input,
#search-input {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  background: #f9fafb;
  color: var(--text-color);
  font-weight: 400;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.shorten-input::placeholder,
#url-input::placeholder,
#code-input::placeholder,
#search-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.shorten-input:focus,
#url-input:focus,
#code-input:focus,
#search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(104, 228, 237, 0.1);
}

.button-primary {
  background: var(--primary-color);
  color: var(--accent-color);
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  width: 100%;
  text-transform: none;
  letter-spacing: 0;
  font-family: 'Poppins', sans-serif;
}

.button-primary:hover {
  background: #5dd4de;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(104, 228, 237, 0.3);
}

.button-primary:active {
  transform: translateY(0);
}

.result-section {
  background: #f3f4f6;
  /* Light gray background */
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  gap: 1rem;
  font-size: 1rem;
  color: #141620;
  /* Dark text */
}

.result-link {
  flex: 1;
  word-break: break-all;
}

.result-link a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.result-link a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.button-copy {
  background: var(--primary-color);
  color: var(--accent-color);
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Poppins', sans-serif;
}

.button-copy:hover {
  background: #5dd4de;
  box-shadow: 0 4px 12px rgba(104, 228, 237, 0.3);
}

.result-error {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 1rem;
  text-align: center;
  padding: 0.75rem;
  background: #fee2e2;
  border-radius: 0.5rem;
  border: 1px solid #fecaca;
}

.signup-prompt {
  font-size: 1rem;
  color: #141620;
  /* Dark text */
  background: #f3f4f6;
  /* Light gray background */
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e5e7eb;
  text-align: center;
  margin: 1.5rem 0 0;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.signup-prompt .button-primary {
  background: var(--secondary-color);
  color: var(--accent-color);
  width: auto;
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.signup-prompt .button-primary:hover {
  background: #f5e042;
}

/* Dashboard Styles */
#dashboard {
  margin-top: 3rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--accent-color);
  text-align: left;
}

.button-logout,
#logout-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  width: auto;
  float: none;
}

.button-logout:hover,
#logout-btn:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

#search-input {
  max-width: 100%;
}

.links-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.links-table th,
.links-table td {
  padding: 1rem 0.75rem;
  text-align: left;
}

.links-table th {
  background: #f9fafb;
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e5e7eb;
}

.links-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.links-table tbody tr:hover {
  background: #f9fafb;
}

.links-table tbody tr:last-child {
  border-bottom: none;
}

.links-table a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
}

.links-table a:hover {
  text-decoration: underline;
  color: #5dd4de;
}

.button-delete {
  background: #f97316;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.button-delete:hover {
  background: #ea580c;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Auth Modal Styles */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  background: white;
  backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 450px;
  width: 100%;
  text-align: left;
  position: relative;
  border: 1px solid #e5e7eb;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  text-align: center;
}

.auth-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.75rem;
  cursor: pointer;
  color: #9ca3af;
  font-weight: normal;
  transition: all 0.2s ease;
  line-height: 1;
  z-index: 1002;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-close:hover {
  color: #dc2626;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-input {
  width: 100%;
  font-size: 1.05rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.95rem 1.25rem;
  background: #f9fafb;
  transition: all 0.2s ease;
  color: var(--text-color);
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
}

.auth-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(104, 228, 237, 0.1);
}

.auth-result {
  font-size: 0.95rem;
  color: #dc2626;
  margin-top: 0.5rem;
  text-align: center;
  font-weight: 500;
}

.auth-toggle-row {
  font-size: 1rem;
  margin-top: 1.25rem;
  text-align: center;
  color: #6b7280;
  user-select: none;
}

.auth-toggle-text {
  cursor: pointer;
}

.auth-toggle-row b {
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
}

.auth-toggle-row b:hover {
  text-decoration: underline;
}

/* Stats Modal Styles */
.stats-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.stats-card {
  background: white;
  backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  width: 100%;
  padding: 2rem 1.5rem;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
}

.stats-card b {
  font-size: 1.5rem;
  color: var(--accent-color);
  display: block;
  margin-bottom: 1rem;
}

.stats-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #f9fafb;
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.95rem;
  border: 1px solid #e5e7eb;
}

.stats-card th,
.stats-card td {
  padding: 0.75rem;
  text-align: left;
}

.stats-card th {
  background: #f3f4f6;
  color: var(--accent-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.stats-card tbody tr {
  border-top: 1px solid #e5e7eb;
}

.stats-card tbody tr:hover {
  background: white;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .form-container {
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
  }

  .shorten-input,
  #url-input,
  #code-input,
  #search-input {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  .button-primary {
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
  }

  .signup-prompt {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    gap: 0.75rem;
  }

  .signup-prompt .button-primary {
    width: 100%;
    padding: 0.75rem 1.5rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .button-logout,
  #logout-btn {
    width: 100%;
  }

  .dashboard-title {
    font-size: 1.75rem;
    text-align: center;
  }

  .links-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .links-table th,
  .links-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .links-table th {
    font-size: 0.75rem;
  }

  .button-copy,
  .button-delete {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .result-section {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.75rem;
  }

  .button-copy {
    width: 100%;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    max-width: 95%;
  }

  .stats-card {
    padding: 1.5rem 1rem;
    max-width: 95%;
  }

  .stats-card table {
    font-size: 0.85rem;
  }

  .stats-card th,
  .stats-card td {
    padding: 0.6rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 1.25rem 1rem;
    border-radius: 1rem;
  }

  .dashboard-title {
    font-size: 1.5rem;
  }

  .links-table th,
  .links-table td {
    padding: 0.6rem 0.35rem;
    font-size: 0.75rem;
  }

  .links-table th {
    font-size: 0.7rem;
  }

  .button-copy,
  .button-delete {
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }
}