:root {
    --primary: #2563eb;
    --primary-dark: #1e3a8a;
    --secondary: #14b8a6;
    --danger: #dc2626;
    --light: #f9fafb;
    --dark: #1f2937;
    --gray: #6b7280;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  .container {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
  }
  
  /* Header */
  .header {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .logo i {
    font-size: 32px;
    color: var(--secondary);
  }
  
  .logo span {
    color: var(--primary);
  }
  
  .language-btn {
    border: 1px solid #e5e7eb;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    color: var(--gray);
    transition: 0.3s;
  }
  
  .language-btn:hover {
    background: var(--light);
    color: var(--primary-dark);
  }
  
  /* Main Content */
  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  p{
    line-height: 1.4;
    font-size: 1.07em;
  }
  
  .intro-text {
    max-width: 950px;
    width: 100%;
    margin: 20px auto;
    padding: 0 20px;
  }
  
  .intro-text p {
    margin: 8px 0;
  }
  
  /* Buttons */
  .btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    justify-content: center;
  }
  
  .btn i {
    font-size: 16px;
  }
  
  .btn-upload {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
  }
  .btn-upload:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
  }
  
  .btn-clear {
    background: #fee2e2;
    color: var(--danger);
  }
  .btn-clear:hover {
    background: #fecaca;
  }
  
  .btn-download {
    background: var(--secondary);
    color: white;
  }
  .btn-download:hover {
    background: #0d9488;
  }
  
  .download-count {
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
  }
  
  .action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Upload Area */
  .upload-container {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    min-height: 300px;
    background: white;
    margin: 30px auto;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
    max-width: 950px;
    width: 100%;
  }
  .upload-container:hover {
    border-color: var(--primary);
  }
  
  .upload-area {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--gray);
    cursor: pointer;
    position: relative;
  }
  
  .upload-area i {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--primary);
  }
  
  .upload-area p {
    margin: 0;
  }
  
  /* Navigation Arrows */
  .navigation-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    left: 0;
    display: none;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  .navigation-arrows.active {
    display: flex;
  }
  
  .nav-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    cursor: pointer;
    transition: 0.3s;
    pointer-events: all;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
  }
  
  .nav-arrow:hover {
    background: var(--primary);
    color: white;
  }
  
  .nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }
  
  .nav-arrow.disabled:hover {
    background: #f1f5f9;
    color: var(--gray);
  }
  
  /* Image Grid Container */
  .image-grid-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    transition: transform 0.3s ease;
  }
  
  .image-card {
    width: 100%;
    max-width: 220px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }
  
  .image-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    border-color: #2563eb;
  }
  
  .image-card.processing {
    opacity: 0.9;
    border-color: #14b8a6;
  }
  
  .image-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .image-filename {
    font-size: 11px;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    letter-spacing: 0.01em;
  }
  
  .close-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  
  .close-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
  }
  
  .image-preview-container {
    position: relative;
  }
  
  .image-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background: #f8fafc;
  }
  
  .compression-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.85) 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    min-width: 50px;
  }
  
  .compression-info.processing {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .status-icon {
    width: 32px;
    height: 32px;
    color: white;
    margin: 0 auto;
    display: block;
  }
  
  .status-icon.sandtimer {
    animation: pulse 1.5s ease-in-out infinite;
  }
  
  .status-icon.settings {
    /* Animation is handled by SVG transforms */
  }
  
  @keyframes pulse {
    0%, 100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.7;
      transform: scale(0.95);
    }
  }
  
  .spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 5px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .quality-control {
    padding: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
  }
  
  .quality-label {
    font-size: 11px;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
  }
  
  
  .btn-upload i.fa-clock {
    margin-right: 4px;
    opacity: 0.8;
  }
  
  .quality-slider-wrapper {
    position: relative;
    width: 100%;
    margin-top: 5px;
  }
  
  .quality-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: height 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 2;
  }
  
  .quality-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
  }
  
  .quality-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
  }
  
  .quality-slider:hover {
    height: 8px;
  }
  
  .quality-slider:active {
    cursor: grabbing;
  }
  
  .quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
    border: 2px solid white;
    position: relative;
    z-index: 3;
  }
  
  .quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.6);
    background: #1e3a8a;
  }
  
  .quality-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
  }
  
  .quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: grab;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
  }
  
  .quality-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.6);
    background: #1e3a8a;
  }
  
  .quality-slider::-moz-range-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
  }
  
  .quality-slider-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #2563eb, #14b8a6);
    pointer-events: none;
    z-index: 1;
    transition: width 0.1s ease;
  }
  
  .download-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    margin-top: auto;
  }
  
  .download-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  }
  
  .download-btn:active {
    transform: translateY(0);
  }
  
  .download-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  
  /* Content Sections */
  .content-section {
    background: white;
    margin: 30px auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    max-width: 950px;
    width: 100%;
  }
  
  .content-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-dark);
  }
  
  .content-section h3 {
    font-size: 18px;
    margin: 25px 0 12px;
    color: var(--primary-dark);
  }
  
  .content-section p {
    font-size: 15px;
    margin-bottom: 14px;
    color: var(--dark);
  }
  
  /* Footer */
  .footer {
    background: #f1f5f9;
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    width: 100%;
  }
  
  .footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .footer-text {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 6px;
  }
  
  .footer-links {
    font-size: 13px;
    color: var(--gray);
  }
  
  .footer-links a {
    color: var(--primary);
    text-decoration: none;
  }
  .footer-links a:hover {
    text-decoration: underline;
  }
  
  /* Responsive - Mobile Carousel */
  @media (max-width: 768px) {
    .header-content {
      flex-direction: column;
      gap: 10px;
    }
    .action-buttons {
      flex-direction: column;
      gap: 12px;
    }
  
    .upload-container {
      overflow-x: hidden;
    }
  
    .image-grid-container {
      flex-wrap: nowrap;
      justify-content: flex-start;
      overflow-x: auto;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      padding: 20px 10px;
    }
  
    .image-grid-container::-webkit-scrollbar {
      display: none;
    }
  
    .navigation-arrows {
      width: 100%;
      left: 0;
      padding: 0 10px;
    }
  
    .nav-arrow {
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
  }
  

@media (max-width: 768px) {

  /* ===== HEADER ===== */
  .header .header-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .header .logo {
    flex: 0 0 50% !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  .header .logo img {
    height: 28px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
  }

  .language-btn {
    flex: 0 0 50% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    text-align: right !important;
    font-size: 13px !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
  }

  /* ===== ACTION BUTTONS ===== */
  .action-buttons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    margin-top: 1.25rem !important; /* mt-5 */
  }

  .action-buttons .btn {
    flex: 1 1 auto !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
  }

  .action-buttons .btn i {
    font-size: 14px !important;
  }

  /* ===== MAIN CONTENT / SECTIONS ===== */
  .main-content,
  .content-section.container {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 5px !important;
  }

  .main-content img,
  .content-section img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .main-content button,
  .content-section button {
    margin: 5px auto !important;
  }
}

