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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Navigation */
.top-nav {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
}

.nav-home {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
}

.nav-home:hover {
    background-color: #eff6ff;
    color: #2563eb;
    text-decoration: none;
}

.nav-home::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 6px solid currentColor;
    margin-right: 8px;
}

/* Brand Navigation */
.nav-brand {
    display: flex;
    align-items: center;
    color: #1f2937;
}

.brand-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.brand-text {
    font-weight: 600;
    font-size: 1.125rem;
    color: #1f2937;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Why Compress Section */
.why-compress {
    background-color: #f9fafb;
    padding: 60px 0;
}

.why-compress h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: #1f2937;
}

.why-compress p {
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Main Content */
.main-content {
    padding: 60px 0;
}

/* Section Styles */
.upload-section, .quality-section, .preview-section {
    margin-bottom: 40px;
}

.upload-section h3, .quality-section h3, .download-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

/* Upload Area */
.upload-area {
    background-color: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

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

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
    pointer-events: none;
}

.upload-area p {
    font-size: 1.125rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 8px;
    pointer-events: none;
}

.upload-hint {
    font-size: 0.875rem !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
    pointer-events: none;
    margin-bottom: 0 !important;
}

/* Quality Control */
.quality-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.quality-control {
    margin-bottom: 24px;
}

.quality-control input[type="range"] {
    width: 100%;
    margin-bottom: 16px;
}

.reset-btn {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Buttons */
.compress-btn, .download-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.compress-btn:hover, .download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.compress-btn:disabled, .download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Preview Container */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.preview-box {
    background-color: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.preview-box h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
    text-align: center;
}

.image-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 2px dashed #d1d5db;
    position: relative;
}

.image-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Placeholder Content */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.placeholder-content p {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: #6b7280;
}

/* Image loaded state */
.image-container.has-image {
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.image-container.has-image .placeholder-content {
    display: none;
}

/* Format Selection */
.format-selection {
    margin-top: 16px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.format-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.format-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.format-select:hover {
    border-color: #3b82f6;
}

.format-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.format-info {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

.image-info {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.download-section {
    text-align: center;
    padding: 32px 0;
}

/* Slider Styles */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

/* FAQ Section */
.faq-section {
    background-color: #f9fafb;
    padding: 60px 0;
}

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

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

.faq-item {
    margin-bottom: 16px;
}

.faq-item details > summary {
    list-style: none;
    cursor: pointer;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    position: relative;
}

.faq-item details > summary::-webkit-details-marker {
    display: none;
}

.faq-item details > summary:hover {
    background-color: #f3f4f6;
}

.faq-item details[open] > summary {
    background-color: #eff6ff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #3b82f6;
}

.faq-item details > div {
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #3b82f6;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.faq-item details > div p {
    color: #4b5563;
    line-height: 1.6;
}

.faq-item details > summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.2s ease-in-out;
    color: #3b82f6;
}

.faq-item details[open] > summary::after {
    content: '−';
    transform: rotate(180deg);
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
}

.footer-links {
    margin: 16px 0;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.privacy-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-nav {
        padding: 8px 0;
    }

    .nav-home {
        font-size: 0.875rem;
        padding: 6px 12px;
    }

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

    .subtitle {
        font-size: 1rem;
    }

    .header {
        padding: 40px 0;
    }

    .why-compress, .main-content, .faq-section {
        padding: 40px 0;
    }

    .preview-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .container {
        padding: 0 16px;
    }

    .faq-item details > summary {
        padding: 16px;
    }

    .faq-item details > div {
        padding: 16px;
    }

    .features-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .quality-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .reset-btn {
        align-self: flex-end;
    }

    .placeholder-content {
        padding: 30px 15px;
    }

    .placeholder-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

    .format-selection {
        padding: 12px;
        margin-top: 12px;
    }

    .format-label {
        font-size: 0.85rem;
    }

    .format-select {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .format-info {
        font-size: 0.75rem;
    }
}

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

    .upload-area {
        padding: 30px 16px;
    }

    .upload-icon {
        width: 48px;
        height: 48px;
    }

    .compress-btn, .download-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Content Pages Styles */
.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #374151;
}

.content-section p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.content-section ul, .content-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #4b5563;
}

.content-section a {
    color: #3b82f6;
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.feature-item {
    background-color: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.feature-item h3 {
    margin-bottom: 12px;
    color: #1f2937;
}

.feature-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Contact Page Styles */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.contact-method {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-method h3 {
    margin-bottom: 16px;
    color: #1f2937;
}

.contact-method p {
    margin-bottom: 12px;
}

.contact-note {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.tech-info {
    background-color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.tech-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

.social-links ul {
    list-style: none;
    padding-left: 0;
}

.social-links li {
    margin-bottom: 8px;
}

/* Privacy Page Styles */
.privacy-highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    margin: 24px 0;
}

.privacy-highlight h3 {
    margin-bottom: 12px;
    color: #1e40af;
}

.privacy-highlight p {
    margin-bottom: 0;
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
}

.cta-section h2 {
    margin-bottom: 16px;
    color: white;
    border-bottom: none;
    padding-bottom: 0;
}

.cta-section p {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: #667eea;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.text-center {
    text-align: center;
}

/* Loading Animation */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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