/*
====================================================
 Image Converter Tool - Premium Styling
====================================================
*/

:root {
    --navy: #1A2A44;
    --gold: #D4AF37;
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --soft-gray: #f5f5f5;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

.tool-page {
    padding-top: 20px;
    min-height: 100vh;
    background-color: var(--soft-gray);
}

/* Tool Header */
.tool-header {
    background: linear-gradient(135deg, var(--navy) 0%, #2A3F66 70%, var(--gold) 200%);
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.7;
}

.premium-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--gold) 0%, #F5D76E 100%);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1;
}

.premium-badge i {
    color: var(--navy);
}

.tool-title {
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1rem auto;
    border-radius: 2px;
}

.tool-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Premium Card */
.premium-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
    overflow: hidden;
    position: relative;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
}

/* Upload Container */
.upload-container {
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--gold);
}

.upload-area {
    border: 2px dashed rgba(212,175,55,0.3);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(245,245,245,0.8) 100%);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.upload-area:hover, .upload-area.highlight {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(245,245,245,0.9) 100%);
    box-shadow: inset 0 2px 15px rgba(212,175,55,0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Settings Container */
.settings-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.image-preview-container {
    flex: 1;
    background: rgba(245,245,245,0.5);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(212,175,55,0.1);
}

.image-preview-container h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.image-preview {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.image-info {
    text-align: left;
    font-size: 0.95rem;
}

.image-info p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.conversion-options {
    flex: 1;
    background: rgba(245,245,245,0.5);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(212,175,55,0.1);
}

.conversion-options h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--navy);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
    background: var(--white);
    transition: var(--transition);
}

select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    outline: none;
    padding: 0;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    transition: var(--transition);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(212,175,55,0.3);
}

/* Action Buttons */
.action-buttons {
    margin-top: 2rem;
    text-align: center;
    position: relative;
    padding: 1rem 0;
}

.action-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    border-radius: 3px;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy) 0%, #2A3F66 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(26,42,68,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary i {
    color: var(--gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26,42,68,0.25);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid rgba(26,42,68,0.2);
    margin-left: 1rem;
}

.btn-outline:hover {
    background: rgba(26,42,68,0.05);
    border-color: var(--navy);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Result Container */
.result-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212,175,55,0.2);
    position: relative;
    background: linear-gradient(135deg, rgba(26,42,68,0.02) 0%, rgba(212,175,55,0.05) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: inset 0 2px 10px rgba(26,42,68,0.03);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212,175,55,0.1);
}

.result-header h3 {
    font-size: 1.4rem;
    color: var(--navy);
    font-weight: 600;
    position: relative;
    padding-left: 1rem;
}

.result-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--navy), var(--gold));
    border-radius: 2px;
}

.result-header p {
    background: rgba(212,175,55,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    color: var(--navy);
    border: 1px solid rgba(212,175,55,0.2);
}

.result-preview {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--white);
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(26,42,68,0.08), 0 3px 10px rgba(212,175,55,0.05);
    border: 1px solid rgba(212,175,55,0.1);
    padding: 1rem;
    position: relative;
}

.result-preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.result-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.7);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(212,175,55,0.1);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.download-btn {
    background: linear-gradient(135deg, var(--navy) 0%, #2A3F66 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(26,42,68,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-btn i {
    color: var(--gold);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26,42,68,0.25);
}

/* Features Section */
.features-section {
    margin: 4rem 0;
    position: relative;
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(26,42,68,0.02) 0%, rgba(212,175,55,0.03) 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4af37' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.features-section > * {
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--navy);
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    border-radius: 3px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(26,42,68,0.05), 0 2px 8px rgba(212,175,55,0.03);
    transition: var(--transition);
    border: 1px solid rgba(212,175,55,0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(26,42,68,0.1), 0 5px 15px rgba(212,175,55,0.05);
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--white) 0%, rgba(255,255,255,0.95) 100%);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    text-shadow: 0 3px 10px rgba(212,175,55,0.3);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    transition: var(--transition);
    display: inline-block;
    background: linear-gradient(135deg, rgba(26,42,68,0.03) 0%, rgba(212,175,55,0.05) 100%);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.1);
}

.feature-card h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 0.8rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.feature-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

.feature-card:hover h3::after {
    width: 60px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: var(--transition);
}

.feature-card:hover p {
    color: var(--navy);
}

/* How to Use Section */
.how-to-section {
    margin: 4rem 0;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.step-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(212,175,55,0.1);
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(26,42,68,0.08);
    border-color: var(--gold);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy) 0%, #2A3F66 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(26,42,68,0.1);
    border: 2px solid var(--white);
}

.step-content h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 1rem;
    font-weight: 600;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    margin: 4rem 0;
}

.faq-container {
    margin-top: 2rem;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(212,175,55,0.1);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--navy);
    font-weight: 600;
    margin: 0;
}

.faq-question i {
    color: var(--gold);
    transition: var(--transition);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

.faq-item.active .faq-question {
    background: rgba(26,42,68,0.02);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .features-grid, .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .settings-container {
        flex-direction: column;
    }
    
    .tool-title h1 {
        font-size: 2rem;
    }
    
    .features-grid, .steps-container {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    .result-header, .result-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}
