

/* ====== Why Section ====== */
.why-section {
  background: linear-gradient(135deg, #F8FBFF 0%, var(--surface) 100%);
  border-top: var(--border);
  border-bottom: var(--border);
  position: relative;
  overflow: hidden;
  padding-top: 2rem !important;
  padding-bottom: 3rem !important;
}

.why-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.why-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.why-header h2 {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.why-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.benefit-item {
  padding: 2.5rem 1.75rem;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid #E8ECEF;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.benefit-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--green) 100%);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
}

.benefit-item:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12);
  transform: translateY(-8px);
}

.benefit-item:hover::before {
  transform: translateX(0);
}

.benefit-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.35s ease;
}

.benefit-icon-1 {
  background: #E0F2FE;
  color: var(--primary);
}

.benefit-icon-2 {
  background: #DCFCE7;
  color: var(--green);
}

.benefit-icon-3 {
  background: #FFEDD5;
  color: var(--orange);
}

.benefit-icon-4 {
  background: #F3E8FF;
  color: #A855F7;
}

.benefit-item:hover .benefit-icon {
  transform: scale(1.1) rotate(5deg);
}

.benefit-item h3 {
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.benefit-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ====== Upload Form Styles ====== */
.upload-dropzone {
  border: 2px dashed rgba(14, 165, 233, 0.3);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  background: #F8FBFF;
  transition: all 0.3s ease;
  position: relative;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: #F0F9FE;
}

.upload-dropzone.dragover {
  border-color: var(--primary);
  background: #E0F2FE;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.file-input {
  display: none;
}

.dropzone-icon {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

.dropzone-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.dropzone-text {
  color: var(--muted);
  margin: 0 0 8px 0;
  font-size: 14px;
}

.dropzone-formats {
  color: #6B7280;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
}

/* File List */
.file-list {
  border: var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: var(--border);
}

.file-list-header h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #F7F8FA;
  border-radius: 8px;
  font-size: 13px;
}

.file-name {
  font-weight: 500;
  color: var(--text);
  flex: 1;
  word-break: break-word;
}

.file-size {
  color: var(--muted);
  font-size: 12px;
  margin: 0 12px;
  white-space: nowrap;
}

.btn-remove {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Preview Container */
.preview-container {
  border: var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-placeholder {
  color: var(--muted);
}

.preview-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  color: #D1D5DB;
}

.preview-placeholder p {
  margin: 0;
  font-size: 14px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
}

.preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: var(--border);
  background: #F7F8FA;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-number {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}


/* Tool Section Layout */
.tool-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.upload-full-width {
  width: 100%;
}

/* Controls Row - Two Column Layout */
.controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: flex-start;
}

/* Format Options Panel */
.format-options {
  background: linear-gradient(135deg, #F0F9FF 0%, #F7F8FA 100%);
  border: 1px solid #E0E7FF;
  border-radius: 14px;
  padding: 20px;
}

.format-options label {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 0px;
  display: block;
}

/* Form Check Styles */
.form-check {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.form-check:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #E0E7FF;
}

.form-check-input {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #0EA5E9;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
}

.form-check-input:checked {
  background-color: #0EA5E9;
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-check-label {
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  margin-bottom: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .controls-row {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}





   /* Layout Options Styling */
    .layout-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .layout-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px 15px;
        border-radius: 8px;
        border: 2px solid #dee2e6;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .layout-btn:hover {
        border-color: #0d6efd;
        background-color: #f8f9ff;
    }

    .layout-btn.active {
        border-color: #0d6efd;
        background-color: #e7f1ff;
    }

    .layout-preview {
        width: 60px;
        height: 80px;
        margin-bottom: 10px;
        position: relative;
        border-radius: 4px;
        background: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .layout-visual {
        width: 50%;
        height: 70%;
        background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
        border-radius: 2px;
    }

    .portrait-preview .layout-visual {
        width: 45%;
        height: 80%;
    }

    .landscape-preview .layout-visual {
        width: 80%;
        height: 45%;
    }

    .auto-preview .layout-visual {
        width: 60%;
        height: 60%;
    }

    .layout-label {
        font-weight: 600;
        font-size: 0.95rem;
        display: block;
    }

    .layout-size {
        color: #6c757d;
        font-size: 0.75rem;
        display: block;
        margin-top: 4px;
    }

    /* Convert Button Gradient */
    .btn-gradient {
        background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
        border: none;
        color: white;
        font-weight: 600;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
        transition: all 0.3s ease;
    }

    .btn-gradient:hover:not(:disabled) {
        background: linear-gradient(135deg, #0b5ed7 0%, #0dbaca 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
        color: white;
    }

    .btn-gradient:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    /* Custom Spinner */
    .custom-spinner {
        width: 120px;
        height: 120px;
        margin: 0 auto;
        position: relative;
    }

    .custom-spinner svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

    .spinner-arc {
        animation: spin 2s linear infinite;
        transform-origin: 50% 50%;
    }

    keyframes spin {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }

    .spinner-logo {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 40px;
        color: #0d6efd;
    }

    /* File List Styling */
    .file-list-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 12px;
        border-bottom: 2px solid #f8f9fa;
    }

    .file-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 6px;
        margin-bottom: 8px;
        transition: all 0.2s ease;
    }

    .file-item:hover {
        background: #e9ecef;
    }

    .file-name {
        font-weight: 500;
        flex-grow: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .file-size {
        color: #6c757d;
        font-size: 0.875rem;
        margin: 0 10px;
    }

    .btn-remove {
        background: none;
        border: none;
        color: #dc3545;
        cursor: pointer;
        padding: 4px 8px;
        font-size: 1.2rem;
        transition: all 0.2s ease;
    }

    .btn-remove:hover {
        color: #a02622;
        transform: scale(1.2);
    }

    /* Preview Grid */
    .preview-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .preview-item {
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        background: #f8f9fa;
        aspect-ratio: 1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    .preview-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .preview-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .preview-number {
        position: absolute;
        top: 8px;
        right: 8px;
        background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
        color: white;
        padding: 4px 8px;
        border-radius: 50%;
        font-size: 0.875rem;
        font-weight: bold;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .preview-container {
        min-height: 300px;
        padding: 20px;
        background: white;
    }

    .preview-placeholder {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: #6c757d;
    }

    .preview-icon {
        font-size: 4rem;
        color: #dee2e6;
        margin-bottom: 15px;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .layout-options {
            grid-template-columns: 1fr;
        }

        .controls-row {
            flex-direction: column;
        }

        .preview-grid {
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        }
    }

    /* Dropzone Hover */
    .upload-dropzone {
        border-radius: 12px;
        border: 2px dashed #dee2e6;
        padding: 40px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        background: white;
    }

    .upload-dropzone:hover {
        border-color: #0d6efd;
        background: #f8f9ff;
    }

    .upload-dropzone.dragover {
        border-color: #0d6efd;
        background: #e7f1ff;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
    }

    .dropzone-icon {
        color: #0d6efd;
        margin-bottom: 10px;
    }

    .dropzone-title {
        margin: 15px 0 10px;
        color: #212529;
    }

    .dropzone-text {
        color: #6c757d;
        margin-bottom: 5px;
    }

    .dropzone-formats {
        font-size: 0.85rem;
        color: #adb5bd;
    }


     /* Post Conversion Section Styles */
    .post-conv-card {
        cursor: pointer;
    }

    .post-conv-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
        transform: translateY(-3px);
        border-color: #dee2e6 !important;
    }

    .post-conv-card:hover .bi-chevron-right {
        transform: translateX(5px);
        color: #495057 !important;
    }

    #back-btn:hover,
    #main-download-btn:hover,
    #post-conversion-section .btn-danger:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }

    #main-download-btn {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }

    #main-download-btn:hover {
        box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
    }

    @media (max-width: 768px) {
        #post-conversion-section h2 {
            font-size: 1.4rem !important;
        }

        #post-conversion-section h3 {
            font-size: 1.2rem !important;
        }

        #main-download-btn {
            min-width: 100% !important;
            max-width: 350px;
        }

        .post-conv-card {
            min-height: 65px !important;
        }

        .post-conv-card span {
            font-size: 0.95rem !important;
        }
    }

    @media (max-width: 576px) {
        #back-btn {
            width: 50px !important;
            height: 50px !important;
        }

        #post-conversion-section .btn-danger.rounded-circle {
            width: 44px !important;
            height: 44px !important;
        }

        #post-conversion-section .btn-danger.rounded-circle i {
            font-size: 1.1rem !important;
        }
    }