* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a2e;
    min-height: 100vh;
    padding: 20px;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

header {
    background: #0f172a;
    color: #f8fafc;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 3px solid #3b82f6;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    font-size: 1.1rem;
    color: #94a3b8;
}

main {
    padding: 40px;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    border-style: solid;
}

.upload-area.dragover {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: scale(1.01);
    border-style: solid;
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #64748b;
    margin-bottom: 20px;
}

.upload-area h2 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 600;
}

.upload-area p {
    color: #64748b;
    font-size: 0.95rem;
}

.preview-section {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.image-preview {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    border: 1px solid #e2e8f0;
}

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

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: scale(1.05);
}

.image-info {
    flex: 1;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.image-info h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.image-info p {
    color: #64748b;
    margin-bottom: 10px;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.options-section {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.options-section h3 {
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.option-group {
    margin-bottom: 25px;
}

.option-group label {
    display: block;
    color: #475569;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select, input[type="number"] {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select {
    width: 100%;
    max-width: 300px;
    background: white;
    cursor: pointer;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
    max-width: 300px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

#qualityValue {
    font-weight: 600;
    color: #3b82f6;
    min-width: 50px;
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 4px;
}

.resize-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.resize-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.resize-detail input[type="number"] {
    width: 100px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-group label:hover {
    background: #f1f5f9;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.convert-btn, .download-btn, .convert-another-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.convert-btn:hover, .download-btn:hover, .convert-another-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.convert-btn:active, .download-btn:active, .convert-another-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.result-section {
    text-align: center;
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.result-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 600;
}

.result-info {
    margin-bottom: 20px;
}

.result-info p {
    color: #64748b;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.download-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#resultImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.convert-another-btn {
    background: #10b981;
}

.convert-another-btn:hover {
    background: #059669;
}

footer {
    background: #f1f5f9;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

/* SEO Content Container inherits container styles */

.seo-main {
    padding: 40px;
}

.seo-main h2 {
    color: #0f172a;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.seo-main h3 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.seo-intro {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3b82f6;
}

.seo-intro p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
}

.seo-features p,
.seo-guide p,
.seo-footer-text p {
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.seo-use-cases ul {
    list-style: none;
    padding: 0;
}

.seo-use-cases li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
    line-height: 1.6;
}

.seo-use-cases li:last-child {
    border-bottom: none;
}

.seo-benefits {
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.benefits-list p {
    padding: 8px 0;
    margin: 0;
    color: #475569;
}

.seo-keywords {
    background: #eff6ff;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border: 1px solid #3b82f6;
}

.seo-keywords p {
    color: #3b82f6;
    font-size: 0.9rem;
    line-height: 2;
    text-align: center;
}

.seo-footer-text {
    background: #0f172a;
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.seo-footer-text p {
    color: #e2e8f0;
    font-size: 1rem;
    margin: 0;
}

/* Hero Section */
.hero-section {
    padding: 40px 0;
    text-align: center;
}

.hero-section h2 {
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.benefit-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
}

.benefit-card h3 {
    color: #1e293b;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.benefit-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Features Section */
.features-section {
    background: #f8fafc;
    padding: 50px 30px;
    border-radius: 12px;
    margin: 40px 0;
    border: 1px solid #e2e8f0;
}

.features-section h2 {
    text-align: center;
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.features-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-item h3 {
    color: #3b82f6;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-item p {
    color: #64748b;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 50px 0;
    text-align: center;
}

.how-it-works h2 {
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    padding: 30px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    position: relative;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.step h3 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step p {
    color: #64748b;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    background: #f8fafc;
    padding: 50px 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.faq-section h2 {
    text-align: center;
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    list-style: none;
    position: relative;
    padding-right: 40px;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    color: #3b82f6;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 20px 20px;
    color: #64748b;
    line-height: 1.6;
}

/* Statistics Section */
.stats-section {
    padding: 60px 0;
    text-align: center;
    background: #0f172a;
    color: white;
    border-radius: 12px;
    margin: 40px 0;
}

.stats-section h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3b82f6;
}

.stat-label {
    font-size: 1rem;
    color: #94a3b8;
}

/* Use Cases */
.use-cases {
    padding: 50px 0;
}

.use-cases h2 {
    text-align: center;
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.use-case {
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.use-case h3 {
    color: #3b82f6;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.use-case p {
    color: #64748b;
    line-height: 1.6;
}

/* Enhanced Footer */
footer {
    background: #f1f5f9;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

footer p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .preview-section {
        flex-direction: column;
    }
    
    .option-group select {
        max-width: 100%;
    }
    
    input[type="range"] {
        max-width: 100%;
    }
}