 link-tools {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
    }

    .link-section {
      display: flex;
      flex-direction: column;
      align-items: center;         /* kept as requested */
      max-width: 900px;            /* as requested */
      width: 100%;
      background: white;
      border-radius: 1.2rem;
      padding: 1.5rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
      transition: all 0.2s ease;
    }

   
    .link-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      justify-content: center;     /* ensures nice centering when wrapped */
      width: 100%;
    }

    /* link-box: consistent chip style */
    .link-box {
      background: #f8f9fc;
      border: 1px solid #e9ecf0;
      border-radius: 0.6rem;
      padding: 0.5rem 0.9rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: background 0.15s, border-color 0.15s;
      /* avoid shrinking too much */
      flex-shrink: 0;
    }

    .link-box:hover {
      background: #f0f2f7;
      border-color: #c8d0dc;
    }

    .link-box a {
      color: #1a2634;
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 500;
      white-space: nowrap;
    }

    .link-box a:hover {
      color: #0057b3;
    }

    .link-box .sep {
      color: #b0b8c4;
      font-size: 0.7rem;
      margin: 0 0.1rem;
    }

    
    @media (max-width: 480px) {
      .link-section {
        padding: 1rem;
        align-items: center;  
      }
      .link-box {
        padding: 0.4rem 0.7rem;
      }
      .link-box a {
        font-size: 0.85rem;
      }
    }

    
    @media (max-width: 400px) {
      .link-box {
        padding: 0.3rem 0.6rem;
      }
      .link-box a {
        font-size: 0.8rem;
      }
    }

:root {
    --primary-color: #6c63ff;  
    --secondary-color: #4dabf7;
    --accent-color: #ff6b6b;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --primary-hover: #5a52d8;
    --primary-gradient: linear-gradient(135deg, #5558ff 0%, #00c0ff 100%);
    --primary-light: #e6f0ff;
    --success-color: #06d6a0;
    --info-color: #48cae4;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --text-color: #495057;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
        
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f9fafb;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* Gradient Button */
.btn-gradient {
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Hover effect - gradient and slight scale */
.btn-gradient:hover {
    background: linear-gradient(135deg, #4a6bff 0%, #8a2be2 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Active/click effect */
.btn-gradient:active {
    transform: scale(0.98);
}

/* Focus effect */
.btn-gradient:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.3);
}

/* Optional: Add a ripple effect */
.btn-gradient::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn-gradient:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
    transform: scale(0, 0);
    opacity: 0.5;
        }
    100% {
    transform: scale(20, 20);
    opacity: 0;
        }
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 0.8rem 0;
    transition: var(--transition);
}
        
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
        
.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--dark-color);
    transition: var(--transition);
    gap: 8px; 
}
        
.navbar-brand:hover {
    color: var(--primary-color);
}
        
.navbar-brand svg {
    margin-right: 10px;
    transition: var(--transition);
}
        
.navbar-brand:hover svg {
    transform: scale(1.05);
}
        
.nav-link {
    font-weight: 500;
    color: var(--dark-color);
    margin: 0 8px;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}
        
.nav-link:not(.btn):hover {
    color: var(--primary-color);
    background-color: rgba(85, 88, 255, 0.08);
}
        
.nav-link:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
}
        
.nav-link:not(.btn):hover::after {
    width: 70%;
}
        
/* Desktop hover behavior */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: slideInRight 0.3s ease forwards;
    }
    
    .dropdown-toggle::after {
        transition: var(--transition);
    }
    
    .dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    /* Right-to-left dropdown positioning */
    .dropdown-menu-right {
        right: 0;
        left: auto;
        transform: translateX(20px);
        opacity: 0;
    }
    
    /* Animation for right-to-left dropdown */
    @keyframes slideInRight {
        from {
            transform: translateX(20px);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}
        
/* Mobile click behavior */
@media (max-width: 991.98px) {
    .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.255em;
        vertical-align: 0.255em;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
    }
    
    .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }
    
    /* Mobile dropdown with scroll */
    .dropdown-menu.mobile-scroll {
        max-height: 70vh;
        overflow-y: auto;
        padding: 1rem;
    }
    
    /* Custom scrollbar for mobile dropdown */
    .dropdown-menu.mobile-scroll::-webkit-scrollbar {
        width: 6px;
    }
    
    .dropdown-menu.mobile-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    .dropdown-menu.mobile-scroll::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }
    
    .dropdown-menu.mobile-scroll::-webkit-scrollbar-thumb:hover {
        background: var(--secondary-color);
    }
    
    /* Scroll indicator for mobile */
    .scroll-indicator {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(transparent, rgba(255,255,255,0.9));
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding-bottom: 5px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .scroll-indicator.show {
        opacity: 1;
    }
    
    .scroll-indicator i {
        color: var(--primary-color);
        font-size: 0.8rem;
        animation: bounce 2s infinite;
    }
    
    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-5px);
        }
        60% {
            transform: translateY(-3px);
        }
    }
    
    /* Right alignment for mobile dropdown */
    .dropdown-menu {
        right: 0;
        left: auto;
        transform: translateX(10px);
    }
    
    .dropdown-menu.show {
        animation: mobileSlideInRight 0.3s ease forwards;
    }
    
    @keyframes mobileSlideInRight {
        from {
            transform: translateX(10px);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}
        
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    width: 500px;
    margin-top: 10px;
}
        
.dropdown-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
        
.dropdown-header {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}
        
.dropdown-header i {
    margin-right: 8px;
    color: var(--primary-color);
}
        
.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}
        
.dropdown-item:hover {
    background-color: rgba(85, 88, 255, 0.08);
    color: var(--primary-color);
}
        
.dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}
        
.btn-compress {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(85, 88, 255, 0.3);
}
        
.btn-compress:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 88, 255, 0.4);
    color: white;
}
        
.navbar-toggler {
    border: none;
    padding: 4px 8px;
}
        
.navbar-toggler:focus {
    box-shadow: none;
}
        
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
        
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 1rem;
    }
    
    .nav-link {
        margin: 4px 0;
        padding: 10px 16px !important;
    }
    
    .btn-compress {
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
    
    .dropdown-menu {
        width: calc(100vw - 2rem);
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .dropdown-two-column {
        grid-template-columns: 1fr;
    }
    
    /* Hide dropdown arrow on desktop */
    .dropdown-toggle::after {
        display: none;
    }
}
        
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
        
.how-it-works-step {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}
        
.how-it-works-step .step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(108, 99, 255, 0.3);
}
        
.faq-card {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}
        
body.dark-mode .faq-card {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-color: #333;
}
        
.faq-header button {
    color: #333;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
    transition: all 0.2s ease;
    gap: 0.75rem; 
    padding: 1rem 1.25rem; 
    background-color: #f8f9fa;
}
        
body.dark-mode .faq-header button {
    color: #e0e0e0;
    background-color: #1e1e1e;
}
        
body.dark-mode .compression-info {
    color: #aaa;
}

.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 50%;
}

@media (min-width: 992px) {
    .hero-section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

body.dark-mode .file-preview-item {
    border-color: #444;
}
        
body.dark-mode .compression-settings {
    background-color: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #333;
}
        
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
        
body.dark-mode .text-muted {
    color: #aaa !important;
}
        
body.dark-mode .text-dark {
    color: #e0e0e0 !important;
}
        
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
        
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}
        
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}
        
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
        
.why-use-item {
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 12px;
}
        
.why-use-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
        
body.dark-mode .why-use-item:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
        
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 8px;
    font-size: 0.8rem;
}
        
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
}
        
.compact-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px 0;
    font-size: 14px;
}
        
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
        
.footer-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
        
.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}
        
.footer-links a:hover {
    color: #e74c3c;
}
        
.copyright {
    color: #bdc3c7;
}
        
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Main content */
.main-containera {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.card-header1 {
    text-align: center;
    font-weight: 600;
    margin: 6px 0 0 0;
    border-top: 5px solid #4dabf7;
    border-radius: 10px;
}

/* Upload container */
.upload-container {
    border: 2.2px dashed #797a7b;
    border-radius: var(--border-radius);
    padding: 2rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgb(237, 244, 250);
    margin-bottom: 1.5rem;
}

/* Card styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: white;
}

.card-header {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.upload-container:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.upload-container.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Button styles */
.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #05b98a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.2);
}

/* Custom range input styles */
#quality-range {
    /* Slider track */
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #c4c4c4;
    border-radius: 4px;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
}

/* For Chrome/Safari */
#quality-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0d6efd; /* Bootstrap primary blue */
    cursor: pointer;
}

#quality-range::-webkit-slider-runnable-track {
    height: 8px;
    background: linear-gradient(90deg, #0d6efd var(--range-progress), #ddd var(--range-progress));
}

/* For Firefox */
#quality-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: none;
}

#quality-range::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: #ddd;
}

#quality-range::-moz-range-progress {
    height: 8px;
    border-radius: 4px;
    background: #0d6efd;
}

/* For IE/Edge */
#quality-range::-ms-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
}

#quality-range::-ms-track {
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    border-color: transparent;
    color: transparent;
}

#quality-range::-ms-fill-lower {
    background: #0d6efd;
    border-radius: 4px;
}

#quality-range:hover {
    opacity: 1;
}

/* Table styles */
.table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--dark-color);
    background-color: #f8f9fa;
    border-top: none;
}

/* File preview thumbnails */
.file-preview-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* Progress bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

.badge-waiting {
    background-color: var(--warning-color);
    color: #000;
}

.badge-processing {
    background-color: var(--info-color);
    color: #fff;
}

.badge-success {
    background-color: var(--success-color);
    color: #fff;
}

.badge-error {
    background-color: var(--danger-color);
    color: #fff;
}

/* Result items */
.result-item {
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0;
    margin-top: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-container {
        padding: 0 1rem;
    }
    
    .upload-container {
        padding: 2rem 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .result-item .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .file-preview-img {
        width: 40px;
        height: 40px;
    }
}

/* Animation for file upload */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-item {
    animation: fadeIn 0.3s ease forwards;
}

/* Loading spinner */
.spinner-border {
    width: 1.2rem;
    height: 1.2rem;
    border-width: 0.15em;
}

/* Tooltip */
.tooltip-inner {
    background-color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* Custom toggle switch */
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.5em;
    margin-top: 0.1em;
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.3);
    z-index: 100;
    transition: var(--transition);
    cursor: pointer;
}

.fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Mobile-specific styles */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .main-container {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .upload-container {
        padding: 1.5rem 1rem;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Stack form elements on mobile */
    .row > .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Adjust file list table for mobile */
    .table-responsive {
        border: none;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .file-preview-img {
        width: 40px;
        height: 40px;
    }
    
    /* Adjust results items for mobile */
    .result-item {
        padding: 1rem !important;
    }
    
    .preview-img {
        width: 60px;
        height: 60px;
    }
    
    /* Stack buttons on mobile */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Make sure buttons are full width on mobile */
    .btn {
        width: 100%;
    }
    
    /* Adjust modal for mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Hide less important elements on mobile */
    .text-md-end {
        text-align: left !important;
        margin-top: 1rem;
    }
    
    /* Make sure inputs are properly sized */
    .form-control, .form-select, .form-range {
        font-size: 14px;
    }
    
    /* Adjust footer layout */
    .footer {
        padding: 2rem 0;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Make sure tooltips don't interfere with touch */
    .tooltip {
        pointer-events: none;
    }
    
    /* Adjust feature cards for mobile */
    .feature-icon i {
        font-size: 2rem !important;
    }
    
    /* FAQ accordion adjustments */
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Additional responsive tweaks for tablets */
@media (max-width: 768px) {
    .result-item .row > div {
        margin-bottom: 1rem;
    }
    
    .result-item .row > div:last-child {
        margin-bottom: 0;
    }
    
    /* Make sure images in comparison don't overflow */
    .comparison-img {
        max-width: 100%;
        height: auto;
    }
}

/* Very small devices (phones less than 400px) */
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .upload-container h3 {
        font-size: 1.1rem;
    }
    
    .upload-container p {
        font-size: 0.8rem;
    }
    
    /* Make file names wrap in table */
    .table td:nth-child(2) {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.page-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.8rem;
}
        
.intro-text {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    color: #555;
}
        
.intro-text strong {
    color: var(--primary-color);
    font-weight: 600;
}
        
/* Table styles for desktop */
.styled-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    background: white;
}
        
.styled-table thead {
    background-color: var(--primary-color);
    color: white;
}
        
.styled-table th {
    padding: 1.2rem 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 0;
}
        
.styled-table tbody tr {
    transition: background-color 0.2s ease;
}
        
.styled-table tbody tr:nth-child(even) {
    background-color: rgba(67, 97, 238, 0.03);
}
        
.styled-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.08);
}
        
.styled-table td {
    padding: 1.2rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.bg-success {
    background-color: var(--success-color) !important;
}
        
.bg-info {
    background-color: var(--info-color) !important;
}
        
.bg-primary {
    background-color: var(--primary-color) !important;
}
        
.bg-warning {
    background-color: var(--warning-color) !important;
}
        
/* Mobile card layout */
.mobile-card-container {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
        
.mobile-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
        
.mobile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
        
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
        
.technique-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
        
.card-content {
    margin-bottom: 1.2rem;
}
        
.card-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
        
.card-value {
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
        
/* Mobile responsiveness */
@media (max-width: 768px) {
    .table-responsiver {
        display: none;
    }
    
    .mobile-card-container {
        display: flex;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
}
        
@media (min-width: 769px) {
    .mobile-card-container {
        display: none;
    }
}
@media (max-width: 767px) {
.costom-add {
  padding: 8px;
}
}
.info-note {
    background-color: rgba(67, 97, 238, 0.08);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-top: 2rem;
    font-size: 0.95rem;
}
        
.info-note strong {
    color: var(--primary-color);
}

.container-custom {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styling */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-header h2 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-header .subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* Card-like sections */
.content-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Section Titles */
.section-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
}

.section-title i {
    margin-right: 12px;
    color: var(--primary-color);
    background-color: var(--primary-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* List Styling */
.styled-list {
    padding-left: 0;
    list-style-type: none;
}

.styled-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.styled-list li:last-child {
    border-bottom: none;
}

.styled-list li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.25rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Alert Box */
.styled-alert {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2.5rem;
    border-left: 5px solid var(--info-color);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.1);
}

.styled-alert h4 {
    color: var(--info-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.styled-alert h4 i {
    margin-right: 10px;
    font-size: 1.5rem;
}

/* Badges */
.info-badge {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #fef3e9, #fff9f0);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--warning-color);
}

/* Animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* WebP Tag */
.webp-tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}