/* gif-converter.css – shared styles for: GIF converters (GIF to JPG/PNG/PDF).
   Loaded after /assets/css/site.css. Replaces: gif-to-jpg.css, gif-to-pdf.css, gif-to-png.css */

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

.gif-preview-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.gif-frame-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

.gif-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.gif-play-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #3666d1, #2b4c94);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.gif-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 102, 209, 0.4);
}

.gif-play-btn:active {
    transform: translateY(0);
}

.frame-counter {
    font-size: 0.85rem;
    color: #4a5568;
    background: #f7fafc;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.frame-extraction-options {
    background: #f0fff4;
    border: 2px solid #c6f6d5;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.frame-thumb {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.frame-thumb:hover {
    border-color: #3666d1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.frame-thumb.selected {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
    transform: scale(1.05);
}

.frame-thumb img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    background: #f8fafc;
}

.frame-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    font-size: 0.65rem;
    padding: 3px;
    font-weight: 600;
}

.frame-delay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    font-size: 0.6rem;
    padding: 2px;
}

.frame-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
}

.frame-range {
    flex: 1;
}

.frame-range input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.frame-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #3666d1;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.seo-content {
    margin: 3rem auto;
}

.seo-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.seo-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.info-box {
    border-left: 4px solid #38a169;
    border-radius: 0 8px 8px 0;
}

.warning-box {
    border-left: 4px solid #ed8936;
    border-radius: 0 8px 8px 0;
}

.tip-box {
    background: #eef3fc;
    border-left: 4px solid #3666d1;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

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

#downloadAllBtn:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.frame-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #eef3fc;
    border-radius: 8px;
    border: 1px solid #d3dff7;
}

.frame-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.frame-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2b4c94;
}

.frame-stat-label {
    font-size: 0.75rem;
    color: #5b6b80;
    margin-top: 0.25rem;
}

.error-message {
    background: #fee;
    border: 2px solid #f99;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #c00;
    text-align: center;
    display: none;
}

.frame-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.quality-slider-container {
    margin: 1rem 0;
}

.quality-value {
    font-weight: bold;
    color: #3666d1;
}

.quality-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #3666d1, #ed8936, #ecc94b, #48bb78, #3666d1);
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3666d1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #5b6b80;
    margin-top: 5px;
}

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

.seo-content {
    max-width: 800px;
    margin: 3rem auto;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.transparency-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #eef3fc;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #2b4c94;
    font-weight: 500;
}

.transparency-indicator::before {
    content: "";
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%), linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    border-radius: 50%;
}

.bg-color-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    background: linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%), linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    position: relative;
    overflow: hidden;
}

.color-preview-fill {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.unified-container {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

.unified-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.unified-content {
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.upload-state,
.preview-state {
    display: none;
}

.upload-state.active,
.preview-state.active {
    display: block;
}

.drag-drop-area {
    text-align: center;
    padding: 3rem 2rem;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drag-drop-area:hover {
    border-color: #38b2ac;
    background: #e6fffa;
}

.drag-drop-area.dragover {
    border-color: #38b2ac;
    background: #e6fffa;
    transform: scale(1.01);
}

.combined-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-main-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    min-height: 300px;
}

@media (max-width: 768px) {
  .preview-main-area {
      grid-template-columns: 1fr;
  }
}

.preview-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.preview-info-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    font-size: 0.85rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    color: #5b6b80;
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.info-value {
    color: #2d3748;
    font-weight: 600;
}
