/**
 * Base64 to Image Converter Tool - Styles
 * Clean, modern, mobile-first responsive design with red color theme
 * No borders or shadows, eye-catching and user-friendly interface
 */

/* 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;
    flex: 1;
}

.result-stats,
.results-summary {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Input Section */
.input-section {
    padding: 25px;
}

.input-area {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
}

.input-label i {
    color: #e74c3c;
}

.base64-textarea {
    width: 100%;
    min-height: 150px;
    max-height: 400px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    background: #f8f9fa;
    color: #495057;
    transition: border-color 0.3s ease;
}

.base64-textarea:focus {
    outline: none;
    border-color: #e74c3c;
    background: white;
}

.base64-textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6c757d;
}

.char-count {
    font-weight: 500;
    color: #e74c3c;
}

.input-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}



/* 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;
    position: relative;
    overflow: hidden;
}

.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-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

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

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

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

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

.btn-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: inherit;
    border-radius: inherit;
}

.btn-text,
.btn-loading {
    transition: opacity 0.3s ease;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loading {
    opacity: 1;
}

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

/* Image Result */
.image-result {
    padding: 25px;
}

.image-preview-container {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
}

.result-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-container:hover .image-overlay {
    opacity: 1;
}

.overlay-actions {
    display: flex;
    gap: 10px;
}

.overlay-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #2c3e50;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Image Details */
.image-details {
    margin-bottom: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: 500;
    color: #6c757d;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Result Actions */
.result-actions,
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}



/* Processing Indicator */
.processing-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.processing-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    min-width: 200px;
}

.processing-spinner {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.processing-text {
    font-weight: 500;
    color: #2c3e50;
}

/* 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;
}

/* 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 h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 20px 0 10px 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;
    }



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

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

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

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

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

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

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

    .base64-textarea {
        min-height: 120px;
        font-size: 0.85rem;
        padding: 12px;
    }

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

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

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



    .processing-content {
        padding: 20px;
        margin: 20px;
    }

    .overlay-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .result-image {
        max-height: 300px;
    }
}

/* Animation for smooth transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-card:not(.hidden) {
    animation: fadeIn 0.5s ease-out;
}

/* 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); }
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}
