/* WEBP to PDF Converter Styles */
:root {
    --primary-color: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #388E3C;
    --secondary-color: #2196F3;
    --secondary-light: #64B5F6;
    --secondary-dark: #1976D2;
    --text-color: #333;
    --text-lighter: #666;
    --bg-color: #f9f9f9;
    --bg-light: #ffffff;
    --border-color: #e0e0e0;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

h1 .highlight {
    color: var(--primary-color);
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-lighter);
    margin-bottom: 2rem;
}

/* Hero Section */
.hero {
    padding: 3rem 0;
}

/* Converter Card */
.converter-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 3rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: var(--transition);
    cursor: pointer;
}

.upload-area.active {
    border-color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
}

.upload-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    display: inline-block;
}

.upload-btn:hover {
    background-color: var(--primary-dark);
}

/* File List */
.file-list-container {
    margin-bottom: 2rem;
}

.file-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.file-list li {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-list li:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 0.8rem;
}

.file-name {
    font-weight: 500;
    margin-right: 1rem;
    word-break: break-all;
}

.file-size {
    color: var(--text-lighter);
    font-size: 0.9rem;
    margin-left: auto;
    margin-right: 1rem;
}

.file-dimensions {
    color: var(--text-lighter);
    font-size: 0.9rem;
    margin-right: 1rem;
}

.remove-file {
    color: var(--error-color);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.remove-file:hover {
    transform: scale(1.1);
}

/* Options Container */
.options-container {
    margin-bottom: 2rem;
    background-color: rgba(0, 0, 0, 0.02);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
}

.option-group {
    margin-bottom: 1.2rem;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.option-group input[type="text"],
.option-group input[type="number"],
.option-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.option-group input[type="text"]:focus,
.option-group input[type="number"]:focus,
.option-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.option-hint {
    font-size: 0.85rem;
    color: var(--text-lighter);
    margin-top: 0.3rem;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.primary-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-btn:hover:not(:disabled) {
    border-color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.05);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress Container */
.progress-container {
    display: none;
    margin-bottom: 2rem;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-lighter);
}

/* Result Container */
.result-container {
    display: none;
    margin-top: 2rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.download-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: var(--primary-light);
}

.download-link i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.download-info {
    flex: 1;
}

.download-filename {
    font-weight: 500;
    margin-bottom: 0.2rem;
    word-break: break-all;
}

.download-meta {
    font-size: 0.85rem;
    color: var(--text-lighter);
}

/* Preview Container */
.preview-container {
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-item iframe {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.preview-title {
    font-weight: 500;
    font-size: 1.1rem;
}

.preview-meta {
    font-size: 0.9rem;
    color: var(--text-lighter);
}

/* Image Grid Preview */
.image-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

.image-preview-item .image-filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.3rem;
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-lighter);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Notification */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 15px 20px;
    border-radius: var(--border-radius-md);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease-out forwards;
    max-width: 350px;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--error-color);
}

.notification.warning {
    background-color: var(--warning-color);
}

.notification.info {
    background-color: var(--info-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Error Message */
.error-message-container {
    background-color: var(--error-color);
    color: white;
    padding: 15px;
    margin: 20px 0;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .converter-card {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 1.5rem;
    }
    
    .checkbox-row {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .converter-card {
        padding: 1rem;
    }
    
    .upload-area i {
        font-size: 2.5rem;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
    }
    
    .feature {
        padding: 1rem;
    }
}
