:root {
    --primary: #0f394c;
    --secondary: #3f37c9;
    --accent: #49b5e7;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #f72585;
}

body {
    background-color: #f4fafe;
    line-height: 1.6;
}

.heros {
    text-align: center;
    padding: 40px 0;
    background: none;
}

.heros h1 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.heros p {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: auto;
}

.upload-container {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(72, 149, 239, 0.05);
}

.upload-area i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 15px;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.upload-area p {
    color: #777;
}

#file-input {
    display: none;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quality-control {
    flex: 1;
    min-width: 200px;
    margin-right: 20px;
}

.quality-control label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.format-select #format {
    outline: none;
    cursor: pointer;
}

.format-select label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

select, input[type="range"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

input[type="range"] {
    -webkit-appearance: none;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

button:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: #fff;
}

button i {
    margin-right: 8px;
}

button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.button-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.button-secondary:hover {
    background: #49b5e7;
}

.results {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h2 {
    color: var(--primary);
}

.summary {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.summary-item {
    text-align: center;
}

.summary-item h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.summary-item p {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.summary-item .percentage {
    color: var(--success);
}

.summary-item .percentage.worse {
    color: var(--warning);
}

.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.image-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.image-preview {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-info {
    padding: 15px;
}

.image-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.image-stats p {
    font-size: 12px;
    color: #666;
}

.progress-container {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.3s;
}

.image-actions {
    display: flex;
    justify-content: space-between;
}

.download-btn {
    background: var(--success);
    padding: 8px 15px;
    font-size: 14px;
}

.download-btn:hover {
    background: #3aa8d8;
}

.download-all {
    text-align: center;
    margin-top: 30px;
}


@media (max-width: 768px) {
    .heros h1 {
        font-size: 36px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .quality-control, .format-select {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .image-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .upload-container {
        padding: 20px;
    }
}

/* Loading spinner */
.spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Advanced settings */
.advanced-settings {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.advanced-settings h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.setting-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.setting-item {
    flex: 1;
    min-width: 200px;
}

.toggle-advanced {
    background: none;
    border: none;
    color: var(--primary);
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.toggle-advanced i {
    margin-right: 5px;
    transition: transform 0.3s;
}

.toggle-advanced.active i {
    transform: rotate(180deg);
}

.size-alert {
  background: #e6f7ff;
  border-left: 4px solid #49b5e7;
  padding: 10px 15px;
  margin: 15px 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #49b5e7;
  font-weight: 500;
}

.size-alert.error {
    background: #fff2f0;
    border-left-color: #ff4d4f;
    color: #ff4d4f;
}

#clear-btn {
    display: none;
}

.seo-about-section {
    background: none;
    padding: 20px 0 0 0;
    border-top: 1px solid #e0e5ff;
    font-family: 'Poppins', sans-serif;
}

.seo-about-section h2 {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.seo-about-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #4895ef;
}

.seo-content .about-tool {
    margin-top: 20px;
}

.seo-about-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 32px;
    color: #49b5e7;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #2d3748;
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    color: #718096;
    font-size: 15px;
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    margin-bottom: 10px;
    color: #4a5568;
    display: flex;
    align-items: center;
}

.benefits-list i {
    color: #48bb78;
    margin-right: 10px;
    font-size: 18px;
}