/**
 * Image to Base64 Converter Tool - Styles
 * Clean, modern, mobile-first responsive design with red color theme
 */

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: white;
    border-radius: 15px;
    color: #2c3e50;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #e74c3c;
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.tool-description {
    font-size: 1.1rem;
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.section-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header i {
    color: #e74c3c;
    font-size: 1.2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
}

.preview-stats {
    margin-left: auto;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.results-summary {
    margin-left: auto;
}

/* Upload Section */
.upload-area {
    padding: 40px 25px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.upload-icon {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.upload-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-weight: 600;
}

.upload-content p {
    margin: 10px 0;
    color: #6c757d;
}

.upload-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 15px;
}

/* URL Upload */
.url-upload {
    padding: 0 25px 25px 25px;
    text-align: center;
}

.url-input {
    margin-top: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.form-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

.option-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.option-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Format Options */
.format-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.radio-label:hover {
    background-color: #fdf2f2;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #e74c3c;
    margin: 0;
}

.radio-text {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.radio-label small {
    color: #6c757d;
    font-size: 0.85rem;
    display: block;
}

/* Checkbox Options */
.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e74c3c;
}

.checkbox-label i {
    color: #e74c3c;
    margin-left: 5px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.btn-outline:hover {
    background: #e74c3c;
    color: white;
}

.btn-link {
    background: transparent;
    color: #e74c3c;
    text-decoration: underline;
    border: none;
    padding: 8px 0;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Conversion Actions */
.conversion-actions {
    text-align: center;
    padding: 25px;
    border-top: 1px solid #e9ecef;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 25px;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

/* Image Grids */
.image-previews-grid,
.base64-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 25px;
}

/* Image Preview Cards */
.image-preview-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-preview-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.image-preview-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.image-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-size {
    font-size: 0.9rem;
    color: #6c757d;
}

.image-container {
    position: relative;
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 180px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-info {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.image-format {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Base64 Result Cards */
.base64-result-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.base64-result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.result-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.result-format-title {
    font-weight: 700;
    color: #e74c3c;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.result-filename {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-format {
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 500;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Base64 Output */
.base64-output {
    padding: 15px;
    background: #f8f9fa;
}

.output-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.output-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 300px;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    resize: vertical;
    background: white;
    color: #495057;
}

.output-textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.output-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* File Size Comparison */
.size-comparison {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.size-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    text-align: center;
}

.size-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.size-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
}

.size-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.size-increase {
    color: #e74c3c;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Progress Section */
.progress-container {
    padding: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.progress-details {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.processing-queue {
    margin-top: 20px;
}

.processing-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    gap: 12px;
}

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

.processing-icon {
    color: #e74c3c;
    font-size: 1.1rem;
}

.processing-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.processing-status {
    font-size: 0.9rem;
    color: #6c757d;
}

.processing-status.success {
    color: #28a745;
}

.processing-status.error {
    color: #dc3545;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification:not(.hidden) {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 12px;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-icon.success {
    color: #28a745;
}

.notification-icon.error {
    color: #dc3545;
}

.notification-icon.info {
    color: #17a2b8;
}

.notification-message {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
    margin-left: auto;
}

/* Copy Success Animation */
.copy-success {
    animation: copyPulse 0.6s ease-out;
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: #d4edda; }
    100% { transform: scale(1); }
}

/* SEO Content */
.seo-content {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.seo-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    line-height: 1.6;
}

.seo-section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.seo-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.seo-section p {
    color: #495057;
    margin-bottom: 15px;
}

.seo-section ul,
.seo-section ol {
    color: #495057;
    margin-bottom: 20px;
    padding-left: 25px;
}

.seo-section li {
    margin-bottom: 8px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px;
    }

    .tool-header {
        padding: 20px 15px;
    }

    .tool-title {
        font-size: 2rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .format-options {
        gap: 12px;
    }

    .radio-label {
        padding: 10px;
    }

    .results-actions {
        flex-direction: column;
        align-items: center;
    }

    .results-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .output-actions {
        flex-direction: column;
    }

    .output-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .input-group {
        flex-direction: column;
    }

    .notification {
        left: 15px;
        right: 15px;
        max-width: none;
    }

    .size-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .image-previews-grid,
    .base64-results-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .seo-content {
        padding: 0 15px;
    }

    .seo-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .tool-title {
        font-size: 1.8rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .upload-area {
        padding: 30px 20px;
        margin: 20px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .btn-large {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .section-header {
        padding: 15px 20px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .option-card {
        padding: 15px;
    }

    .output-textarea {
        min-height: 100px;
        font-size: 0.8rem;
    }

    .size-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}
