/* converter.css – shared styles for: Image format converters (JPG/PNG/WebP/GIF/SVG/TIFF/BMP).
   Loaded after /assets/css/site.css. Replaces: jpg-to-gif.css, png-to-gif.css, svg-convertor.css, webp-to-gif.css, gif-to-webp.css, svg-png.css, jpg-to-pdf.css, jpg-to-png.css, jpg-to-tiff.css, png-to-tiff.css */

@keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

.unified-box {
    border: 3px dashed #d1d9e6;
    border-radius: 12px;
    margin: 2rem auto;
}

.unified-content {
    padding: 3rem 2rem;
}

.unified-title {
    font-size: 22px;
    font-weight: 600;
}

.unified-subtitle {
    margin-bottom: 25px;
    margin-left: auto;
    margin-right: auto;
}

.animation-settings {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid #e2e8f0;
    display: none;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.setting-label {
    font-weight: 600;
    color: #2d3748;
    min-width: 150px;
}

.setting-control {
    flex: 1;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #4299e1;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #4299e1, #2b6cb0);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #4299e1;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.conversion-mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mode-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.mode-btn.active {
    background: linear-gradient(135deg, #4299e1, #2b6cb0);
    color: white;
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.2);
}

.mode-btn:hover:not(.active) {
    border-color: #4299e1;
    background: #f0f7ff;
}

.mode-description {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.size-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.size-preset-btn {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
}

.size-preset-btn:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.size-preset-btn.active {
    border-color: #4299e1;
    background: #4299e1;
    color: white;
    font-weight: 600;
}

.size-preset-btn .size-desc {
    font-size: 0.7rem;
    color: #718096;
    margin-top: 0.25rem;
}

.size-preset-btn.active .size-desc {
    color: rgba(255, 255, 255, 0.9);
}

.custom-size-inputs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.custom-size-inputs input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.custom-size-inputs span {
    color: #718096;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
  .unified-content {
      padding: 2rem 1rem;
  }
  
  .unified-box {
      margin: 1rem auto;
  }
  
  .setting-row {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .setting-label {
      min-width: auto;
  }
  
  .conversion-mode-selector {
      flex-direction: column;
  }
  
  .size-presets {
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }
}

.modern-button::before {
    top: 50%;
    left: 50%;
}

.sortable-frame {
    transition: all 0.3s;
}

.sortable-frame:hover {
    border-color: #4299e1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.2);
}

.sortable-frame.dragging {
    opacity: 0.5;
}

.sortable-frame.over {
    border-color: #10b981 !important;
    transform: scale(1.05);
}

.modern-button .download-btn {
    display: none;
    padding: 0.85rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.feature-card {
    border-radius: 10px;
    border-left: 4px solid #4a7bff;
}

.transparency-settings {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid #bae6fd;
    display: block;
}

.transparency-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #92400e;
    font-size: 0.9rem;
}

.transparency-note strong {
    color: #b45309;
}

.sortable-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.2);
}

.sortable-frame.over {
    transform: scale(1.05);
}

@keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

.compatibility-note {
    border: 1px solid #7dd3fc;
    border-radius: 6px;
}

.security-alert {
    border: 1px solid #4fd1c5;
    border-radius: 0.5rem;
}

.action-section {
    text-align: center;
    margin: 1.5rem 0;
}

.convert-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #4299e1, #2b6cb0);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
    position: relative;
    overflow: hidden;
}

.progress-card {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 2px solid #e2e8f0;
}

.results-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 2px solid #86efac;
}

.related-tools-section {
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

#frameOrderControls {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    display: none;
}

.sortable-frame {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    cursor: grab;
    flex-shrink: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.unified-upload-area {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.upload-preview-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.upload-preview-card.drag-over {
    border-color: #4299e1;
    background-color: #f0f9ff;
    border-style: solid;
}

.upload-preview-card.has-files {
    border-style: solid;
    border-color: #e2e8f0;
    justify-content: flex-start;
}

.upload-instructions {
    padding: 2rem;
}

.upload-icon {
    color: #4299e1;
}

.content-section {
    margin: 3rem 0;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.content-section h2 {
    padding-bottom: 0.75rem;
    font-size: 1.5rem;
}

.feature-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.feature-item h4 {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #2d3748;
}

.comparison-table tr:hover {
    background-color: #f8fafc;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.no-js-message {
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    color: #856404;
    text-align: center;
    margin-bottom: 1.5rem;
}

.modern-button:not(:disabled):hover {
    transform: translateY(-2px);
}

.convert-btn:not(:disabled):hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(66, 153, 225, 0.5);
}

#clearBtn:hover,
#addMoreBtn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}
