/* JPG to PNG Converter Tool Styles */

:root {
    --primary-color: #00C4CC;
    --secondary-color: #6A3BE4;
    --gradient-bg: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --error-color: #F44336;
    --info-color: #2196F3;
}

/* Converter App Container */
.converter-app {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Upload Container */
.upload-container {
    border: 3px dashed var(--primary-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: rgba(91, 76, 196, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.upload-container:hover, .upload-container.active {
    border-color: var(--secondary-color);
    background-color: rgba(193, 46, 97, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.upload-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 12px 12px 0 0;
}

.upload-container p {
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.upload-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.3s;
}

.upload-btn:hover {
    opacity: 0.9;
}

.file-info {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 1rem;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.convert-btn, .download-btn {
    flex: 1;
    padding: 0.75rem 0;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
    color: white;
    font-weight: 500;
}

.convert-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.convert-btn:hover {
    opacity: 0.9;
}

.download-btn {
    background-color: var(--success-color);
}

.download-btn:hover {
    opacity: 0.9;
}

/* Loading */
.loading {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--gray-700);
}

/* Preview Container */
.preview-container {
    margin-bottom: 2rem;
}

.preview-heading {
    color: var(--gray-800);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.preview-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-box {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.preview-box h3 {
    background-color: var(--gray-100);
    padding: 0.75rem;
    font-size: 1rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-300);
}

.image-container {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background-color: white;
}

.image-container img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.info {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-300);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Format info boxes */
.format-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.format-box {
    border: none;
    border-radius: 12px;
    padding: 2rem;
    background-color: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.format-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.format-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.format-box h3 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.8rem;
    font-weight: 600;
}

.format-box ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.format-box li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pros, .cons {
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.pros {
    background-color: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.pros::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--success-color);
}

.cons {
    background-color: rgba(244, 67, 54, 0.08);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.cons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--error-color);
}

.pros h4, .cons h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.pros h4::before, .cons h4::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
}

.pros h4 {
    color: var(--success-color);
}

.pros h4::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234CAF50'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.cons h4 {
    color: var(--error-color);
}

.cons h4::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F44336'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E");
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th, .comparison-table td {
    padding: 1.2rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.comparison-table th {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.comparison-table th:first-child {
    border-top-left-radius: 12px;
}

.comparison-table th:last-child {
    border-top-right-radius: 12px;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background-color: rgba(91, 76, 196, 0.03);
}

.comparison-table tr:hover {
    background-color: rgba(91, 76, 196, 0.08);
}

/* Style specific cells */
.comparison-table td:nth-child(2), .comparison-table td:nth-child(3) {
    font-weight: 500;
}

.comparison-table td:nth-child(2) {
    color: var(--primary-color);
}

.comparison-table td:nth-child(3) {
    color: var(--secondary-color);
}

/* Why Convert Section */
.why-convert {
    background: linear-gradient(135deg, rgba(91, 76, 196, 0.05), rgba(193, 46, 97, 0.05));
    border-radius: 12px;
    padding: 2.5rem;
    margin: 3rem 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.why-convert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.why-convert h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.why-convert h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.why-convert ul {
    list-style-type: none;
    padding-left: 0.5rem;
    margin: 1.5rem 0;
}

.why-convert li {
    margin-bottom: 1rem;
    color: var(--gray-800);
    position: relative;
    padding-left: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.why-convert li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235B4CC4'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.why-convert li strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .format-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .preview-images {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
    }

    .convert-btn, .download-btn {
        width: 100%;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    /* Adjust How to Use section */
    .how-to-use .step {
        margin-bottom: 1rem;
        padding: 1rem;
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    }

    .how-to-use .step-content h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: var(--primary-color);
        font-weight: 600;
    }

    .how-to-use .step-content p {
        font-size: 1.05rem;
        line-height: 1.5;
        margin: 0;
        color: var(--gray-800);
    }

    .upload-container {
        padding: 2rem 1.5rem;
    }

    .why-convert {
        padding: 2rem 1.5rem;
    }

    .why-convert h3 {
        font-size: 1.4rem;
    }

    .comparison-table th, .comparison-table td {
        padding: 1rem;
    }

    .comparison-table th {
        font-size: 1rem;
    }
}

/* Content styling */
.content-intro {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(91, 76, 196, 0.05), rgba(193, 46, 97, 0.05));
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.highlight-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-800);
    font-weight: 500;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.format-details {
    background-color: rgba(91, 76, 196, 0.05);
    padding: 1.2rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.format-details p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.format-details p:last-child {
    margin-bottom: 0;
}

.format-usage {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(91, 76, 196, 0.08);
    border-radius: 8px;
    font-size: 1.05rem;
    text-align: center;
}

.conclusion {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-800);
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(91, 76, 196, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Adjustments for How to Use section */
.how-to-use {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.how-to-use h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 1rem;
}

.how-to-use h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.how-to-use .steps-container {
    margin: 1.5rem 0 0.5rem;
}

.how-to-use .step {
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background-color: rgba(91, 76, 196, 0.03);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-to-use .step:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.how-to-use .step-number {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.how-to-use .step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.how-to-use .step-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    color: var(--gray-800);
}
