/* WEBP Converter Specific Styles */

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #40444b;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #36393f;
}

.upload-area:hover {
    border-color: #5865f2;
    background: #3a3e44;
}

.upload-area.dragover {
    border-color: #5865f2;
    background: #3a3e44;
    transform: scale(1.02);
}

.upload-area svg {
    color: #72767d;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.upload-area:hover svg {
    color: #5865f2;
}

.upload-text {
    color: #dcddde;
    font-size: 1rem;
    font-weight: 500;
    margin: 8px 0 4px 0;
}

.upload-subtext {
    color: #72767d;
    font-size: 0.85rem;
    margin: 0;
}

/* Settings Section */
.settings-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #40444b;
    border-radius: 8px;
    border: 1px solid #202225;
}

.settings-section h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #5865f2;
    padding-bottom: 8px;
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 12px;
    color: #b9bbbe;
    font-size: 0.9rem;
    font-weight: 500;
}

.input-group label span {
    color: #5865f2;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #2f3136;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #5865f2;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #4752c4;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #5865f2;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #4752c4;
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #72767d;
    margin-top: 4px;
}

/* Images Section */
.images-section {
    margin-bottom: 20px;
}

.images-section h3 {
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #5865f2;
    padding-bottom: 8px;
}

.image-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #36393f;
    border-radius: 8px;
    border: 1px solid #202225;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #72767d;
}

.empty-state svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #40444b;
    border-radius: 6px;
    border: 1px solid #202225;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.image-item:hover {
    background: #484c52;
    border-color: #5865f2;
}

.image-item:last-child {
    margin-bottom: 0;
}

.image-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #202225;
    flex-shrink: 0;
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-details {
    color: #b9bbbe;
    font-size: 0.8rem;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.image-size {
    color: #72767d;
}

.image-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-convert {
    background: #5865f2;
    color: white;
}

.btn-convert:hover {
    background: #4752c4;
}

.btn-convert:disabled {
    background: #40444b;
    color: #72767d;
    cursor: not-allowed;
}

.btn-remove {
    background: #ed4245;
    color: white;
}

.btn-remove:hover {
    background: #c03537;
}

/* Preview Area */
.preview-area {
    min-height: 300px;
    max-height: 855px;
    overflow-y: auto;
    padding: 20px;
    background: #36393f;
    border-radius: 8px;
    border: 1px solid #202225;
    margin-bottom: 20px;
}

.empty-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #72767d;
    text-align: center;
}

.empty-preview svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-preview p {
    margin: 0;
    font-size: 0.9rem;
}

.preview-item {
    background: #40444b;
    border-radius: 8px;
    border: 1px solid #202225;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.preview-item:last-child {
    margin-bottom: 0;
}

.preview-item:hover {
    border-color: #5865f2;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #202225;
}

.preview-title {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

.preview-status.pending {
    background: #faa61a;
    color: #2c2f33;
}

.preview-status.converted {
    background: #57f287;
    color: #2c2f33;
}

.preview-status.error {
    background: #ed4245;
    color: white;
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}

.preview-image-container {
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid #202225;
    object-fit: contain;
}

.preview-label {
    color: #b9bbbe;
    font-size: 0.8rem;
    margin-top: 8px;
    font-weight: 500;
}

.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-item {
    background: #36393f;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #202225;
}

.stat-label {
    color: #72767d;
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.stat-value {
    color: #dcddde;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-value.compressed {
    color: #57f287;
}

.stat-value.larger {
    color: #faa61a;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

.btn-download {
    flex: 1;
    padding: 10px 16px;
    background: #57f287;
    color: #2c2f33;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-download:hover {
    background: #43d67a;
    transform: translateY(-1px);
}

.btn-download:disabled {
    background: #40444b;
    color: #72767d;
    cursor: not-allowed;
    transform: none;
}

/* Header Controls - Buttons in Preview Header */
.preview-section .header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.preview-section .header-controls .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
  
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 28px;
    line-height: 1;
    margin: 0;
    vertical-align: middle;
}

.preview-section .header-controls .btn:disabled {
    background: #40444b;
    color: #72767d;
    cursor: not-allowed;
    opacity: 0.6;
}

.preview-section .header-controls .btn:disabled:hover {
    transform: none;
}

/* Custom scrollbar */
.image-list::-webkit-scrollbar,
.preview-area::-webkit-scrollbar {
    width: 8px;
}

.image-list::-webkit-scrollbar-track,
.preview-area::-webkit-scrollbar-track {
    background: #2f3136;
    border-radius: 4px;
}

.image-list::-webkit-scrollbar-thumb,
.preview-area::-webkit-scrollbar-thumb {
    background: #4f545c;
    border-radius: 4px;
}

.image-list::-webkit-scrollbar-thumb:hover,
.preview-area::-webkit-scrollbar-thumb:hover {
    background: #5d6269;
}

/* Responsive Design */
@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
    }

    .preview-content {
        grid-template-columns: 1fr;
    }

    .preview-stats {
        grid-template-columns: 1fr;
    }

    .preview-section .header-controls {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .preview-section .header-controls .btn {
        width: 100%;
        min-width: unset;
    }
}

