/**
 * Enhanced styles for URL Shortener
 * File: assets/css/style.css
 */

:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4cc9f0;
  --success-color: #2dc653;
  --warning-color: #f9c74f;
  --danger-color: #f94144;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --card-border-radius: 0.75rem;
  --btn-border-radius: 0.5rem;
  --transition-speed: 0.3s;
}

/* Base styles */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f5f7fb;
  color: var(--dark-color);
  overflow-x: hidden;
}

/* Enable smooth scrolling */
html {
  scroll-behavior: smooth;
}

.content-wrapper {
  flex: 1;
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.25rem;
}

/* Navbar styling */
.navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  transition: transform var(--transition-speed);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: var(--btn-border-radius);
  transition: all var(--transition-speed);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Card styling */
.card {
  border: none;
  border-radius: var(--card-border-radius);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
}

/* Dashboard cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  transform-origin: center;
  transition: all var(--transition-speed);
}

.card.bg-success {
  background: linear-gradient(135deg, #34b065, var(--success-color)) !important;
}

.card.bg-info {
  background: linear-gradient(135deg, #3a9dd6, var(--accent-color)) !important;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-info:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card.bg-primary .card-title,
.card.bg-success .card-title,
.card.bg-info .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.card.bg-primary .card-text,
.card.bg-success .card-text,
.card.bg-info .card-text {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* Button styling */
.btn {
  border-radius: var(--btn-border-radius);
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #34b065, var(--success-color));
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--success-color), #34b065);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(45, 198, 83, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #e74645, var(--danger-color));
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--danger-color), #e74645);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(249, 65, 68, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #3a9dd6, var(--accent-color));
  border: none;
  color: white;
}

.btn-info:hover {
  background: linear-gradient(135deg, var(--accent-color), #3a9dd6);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(76, 201, 240, 0.3);
  color: white;
}

.btn-outline-secondary {
  border: 1px solid var(--gray-color);
}

.btn-outline-secondary:hover {
  background-color: var(--gray-color);
  color: white;
}

/* Button ripple effect */
.btn::after {
  content: '';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn:active::after {
  transform: scale(0, 0);
  opacity: 0.2;
  transition: 0s;
}

/* Form styling */
.form-control {
  border-radius: var(--btn-border-radius);
  padding: 0.6rem 1rem;
  border: 1px solid #e0e0e0;
  transition: all var(--transition-speed);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-select {
  border-radius: var(--btn-border-radius);
  padding: 0.6rem 1rem;
  border: 1px solid #e0e0e0;
}

/* Table styling */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  font-weight: 600;
  background-color: #f8f9fa;
  border-top: none;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

.table td, .table th {
  padding: 1rem;
  vertical-align: middle;
}

/* Truncate URLs with tooltip */
.text-truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Alert styling */
.alert {
  border-radius: var(--card-border-radius);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  animation: slideIn var(--transition-speed) ease-out forwards;
}

/* Pagination styling */
.pagination {
  margin-bottom: 0;
}

.page-link {
  color: var(--primary-color);
  border-radius: 0.25rem;
  margin: 0 0.15rem;
  transition: all var(--transition-speed);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-link:hover {
  background-color: rgba(67, 97, 238, 0.1);
  transform: translateY(-2px);
}

/* Footer styling */
footer {
  background: linear-gradient(135deg, var(--dark-color), #16181b);
  color: white;
  padding: 2rem 0;
  margin-top: auto;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-speed);
}

footer a:hover {
  color: white;
  text-decoration: none;
}

/* Login/Register forms */
.auth-card {
  max-width: 450px;
  margin: 2rem auto;
  border-radius: var(--card-border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.auth-card .card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
  padding: 2rem 1.5rem;
}

.auth-card .card-body {
  padding: 2rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translateY(20px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn var(--transition-speed) ease-out forwards;
}

.slide-in {
  animation: slideIn var(--transition-speed) ease-out forwards;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Additional utilities */
.icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: all var(--transition-speed);
}

.icon-container:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.icon-container i {
  font-size: 1.5rem;
}

/* Home page URL shortener */
.url-shortener-card {
  max-width: 800px;
  margin: 2rem auto;
  border-radius: var(--card-border-radius);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.url-shortener-card .card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
  padding: 2rem 1.5rem;
}

.url-shortener-card .card-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.url-result {
  background-color: #f8f9fa;
  border-radius: var(--btn-border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  animation: slideIn var(--transition-speed) ease-out forwards;
}

/* Api key display */
.api-key-display {
  background-color: #f8f9fa;
  border-radius: var(--btn-border-radius);
  padding: 1rem;
  position: relative;
}

.copy-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Password strength meter */
.password-strength-meter {
  height: 5px;
  width: 100%;
  background-color: #e0e0e0;
  margin-top: 0.5rem;
  border-radius: 3px;
  overflow: hidden;
}

.password-strength-meter .strength-value {
  height: 100%;
  width: 0%;
  transition: width var(--transition-speed);
}

.strength-value.weak {
  width: 33.33%;
  background-color: var(--danger-color);
}

.strength-value.medium {
  width: 66.66%;
  background-color: var(--warning-color);
}

.strength-value.strong {
  width: 100%;
  background-color: var(--success-color);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .card-body {
    padding: 1.25rem;
  }
  
  .table td, .table th {
    padding: 0.75rem;
  }
  
  .text-truncate {
    max-width: 150px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 1rem;
  }
  
  .text-truncate {
    max-width: 100px;
  }
  
  .btn-group-sm .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }
  
  .table td, .table th {
    padding: 0.5rem;
  }
  
  .d-flex.justify-content-between {
    flex-direction: column;
    gap: 1rem;
  }
  
  .d-flex.justify-content-between .btn {
    width: 100%;
  }
}

/* Feature boxes on homepage */
.feature-box {
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-speed);
  border-radius: var(--card-border-radius);
  background-color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-box i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.feature-box h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Stats counter */
.stats-counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tooltip custom styling */
.custom-tooltip {
  position: relative;
  display: inline-block;
}

.custom-tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--dark-color);
  color: #fff;
  text-align: center;
  border-radius: var(--btn-border-radius);
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity var(--transition-speed);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
}

.custom-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* URL Box Styling */
.url-box {
  border: 1px solid #e0e0e0;
  border-radius: var(--btn-border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all var(--transition-speed);
}

.url-box:hover {
  border-color: var(--primary-color);
  transform: scale(1.01);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.url-box .short-url {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.url-box .original-url {
  color: var(--gray-color);
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.url-box .url-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--gray-color);
}

.url-box .url-stats i {
  margin-right: 0.25rem;
}

/* Hero section for homepage */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 5rem 0;
  margin-bottom: 3rem;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero-section p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Create a cool wave shape at the bottom of the hero */
.wave-shape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-shape svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.wave-shape .shape-fill {
  fill: #FFFFFF;
}

/* Custom Checkbox styling */
.custom-checkbox {
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  display: block;
  margin-bottom: 15px;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.custom-checkbox:hover input ~ .checkmark {
  background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.custom-checkbox .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Progress bar animation */
@keyframes progressAnimation {
  0% { width: 0%; }
  100% { width: 100%; }
}

.animated-progress {
  position: relative;
  height: 5px;
  display: block;
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.animated-progress .progress-bar {
  position: absolute;
  height: 100%;
  background-color: var(--primary-color);
  animation: progressAnimation 1s ease-in-out forwards;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: -50px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: bottom 0.3s, background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#back-to-top.show {
    bottom: 30px;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Hamburger menu animation */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler.active {
    transform: rotate(90deg);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader .spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s infinite linear;
}

/* Dropdown menu enhancement */
.dropdown-menu {
    border: none;
    border-radius: var(--btn-border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-divider {
    margin: 0.5rem 0;
    opacity: 0.1;
}

/* URL Card Styles */
.url-card {
    border-radius: var(--card-border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.url-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.url-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.url-card .short-url {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.url-card .original-url {
    word-break: break-all;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.url-card .stats {
    display: flex;
    justify-content: space-between;
}

.url-card .stats .stat-item {
    text-align: center;
}

.url-card .stats .stat-item .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.url-card .stats .stat-item .label {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Custom active navbar link */
.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    border-radius: var(--btn-border-radius);
}

/* Pulse animation for buttons */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
    }
}

/* Table enhancements */
.table-hover tbody tr {
    transition: all 0.2s;
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.02);
}

/* Custom badges */
.badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.badge-new {
    background-color: var(--primary-color);
    color: white;
    padding: 0.35em 0.6em;
    font-size: 75%;
    font-weight: 600;
    border-radius: 10px;
    animation: badgePulse 2s infinite;
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: var(--card-border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dashboard-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.dashboard-card .label {
    color: var(--gray-color);
    font-size: 1rem;
}

.dashboard-card .trend {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.dashboard-card .trend.up {
    color: var(--success-color);
}

.dashboard-card .trend.down {
    color: var(--danger-color);
}

/* Add preloader to the body */
body::after {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s;
}

body.loaded::after {
    opacity: 0;
}

/* Notification badge for new features */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background-color: var(--danger-color);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

/* Animated background gradient */
.animated-gradient {
    background: linear-gradient(-45deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Custom switch toggle */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.custom-switch .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.custom-switch input:checked + .slider {
    background-color: var(--primary-color);
}

.custom-switch input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

.custom-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Custom table responsive design for mobile */
@media (max-width: 767.98px) {
    .responsive-table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
    
    .responsive-table thead {
        display: none;
    }
    
    .responsive-table tbody tr {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: var(--card-border-radius);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    
    .responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 0.5rem 0;
        text-align: right;
    }
    
    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
    }
    
    .responsive-table tbody td:not(:last-child) {
        border-bottom: 1px solid #f0f0f0;
    }
}

/* Floating help button */
.floating-help {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s;
}

.floating-help:hover {
    transform: scale(1.1);
    background-color: var(--secondary-color);
}

/* Style for code blocks */
pre.code-block {
    background-color: #f8f9fa;
    border-radius: var(--btn-border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    border-left: 4px solid var(--primary-color);
}

code {
    color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* User profile card */
.profile-card {
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    position: relative;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    margin-bottom: 1rem;
}

.profile-info {
    padding: 2rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-stat {
    padding: 0.5rem;
}

.profile-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-stat .label {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Additional form styling */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    opacity: 0.8;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

/* Implement dark mode toggle */
.dark-mode-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    cursor: pointer;
}

.dark-mode-toggle .toggle {
    position: relative;
    width: 60px;
    height: 30px;
    border-radius: 15px;
    background-color: #e0e0e0;
    margin: 0 10px;
    cursor: pointer;
}

.dark-mode-toggle .toggle::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    background-color: white;
    transition: all 0.3s;
}

.dark-mode-toggle input:checked + .toggle {
    background-color: var(--primary-color);
}

.dark-mode-toggle input:checked + .toggle::before {
    transform: translateX(30px);
}

.dark-mode-toggle input {
    display: none;
}

/* Add a theme class for dark mode */
body.dark-theme {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-theme .card {
    background-color: #1e1e1e;
    border-color: #2c2c2c;
}

body.dark-theme .navbar {
    background: linear-gradient(135deg, #2c2c2c, #1e1e1e);
}

body.dark-theme .table {
    color: #f5f5f5;
}

body.dark-theme .table th {
    background-color: #2c2c2c;
}

body.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .footer {
    background: linear-gradient(135deg, #2c2c2c, #1e1e1e);
}

/* Bouncing arrow animation for scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    text-align: center;
    color: white;
}

.scroll-indicator i {
    font-size: 24px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}