:root {
    --primary: #7B61FF;
    --primary-light: #917CFF;
    --primary-dark: #5D4ACF;
    --secondary: #00D1C7;
    --secondary-light: #2CE0D7;
    --accent: #FF6B9E;
    --dark: #1A1A2E;
    --dark-soft: #2A2A3A;
    --light: #FDFDFF;
    --light-gray: #F5F7FA;
    --gray: #E3E8EF;
    --text: #4A4A68;
    --text-light: #6E6E8A;
    --success: #00C9A7;
    --error: #FF5C8D;
    --warning: #FFB85C;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--light-gray);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--light);
    box-shadow: 0 4px 30px rgba(123, 97, 255, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 10px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.logo-text span {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-soft);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.03) 0%, rgba(0, 209, 199, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.08) 0%, rgba(123, 97, 255, 0) 70%);
    top: -300px;
    left: -300px;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 209, 199, 0.08) 0%, rgba(0, 209, 199, 0) 70%);
    bottom: -300px;
    right: -300px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 500;
}

/* Upload Section */
.upload-container {
    background-color: var(--light);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(123, 97, 255, 0.1);
    padding: 50px;
    max-width: 800px;
    margin: 0 auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(123, 97, 255, 0.1);
}

.upload-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.upload-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(123, 97, 255, 0.15);
}

.upload-box {
    border: 2px dashed var(--gray);
    border-radius: 16px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-bottom: 30px;
    background-color: rgba(245, 247, 250, 0.5);
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: var(--primary-light);
    background-color: rgba(123, 97, 255, 0.03);
}

.upload-box.active {
    border-color: var(--success);
    background-color: rgba(0, 201, 167, 0.05);
}

.upload-icon {
    font-size: 56px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
}

.upload-text h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--dark);
}

.upload-text p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--gray);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.3);
    border-color: transparent;
}

.preview-container {
    display: none;
    margin-top: 30px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-title {
    font-size: 22px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--dark);
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.image-box {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.image-box h4 {
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 18px;
    color: var(--dark-soft);
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease;
}

.preview-image:hover {
    transform: scale(1.02);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Toggle button style */
.btn-toggle {
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--secondary), var(--primary-light));
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: none; /* default hidden */
}

/* Utility classes */
.mobile-only {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
        text-align: center;
    }

    .image-preview {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .image-box {
        display: none;
        width: 100%;
        max-width: 320px;
        text-align: center;
        padding: 0 16px;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .image-box.active {
        display: block;
    }

    .preview-image {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
}


/* Features Section */
.features {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 97, 255, 0.05) 0%, rgba(123, 97, 255, 0) 70%);
    top: -400px;
    right: -400px;
    z-index: 0;
}

.features-content {
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 70px;
    color: var(--dark);
    letter-spacing: -1px;
}

.section-title span {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--light);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(123, 97, 255, 0.08);
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(123, 97, 255, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.feature-desc {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.7;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark), var(--dark-soft));
    color: white;
    padding: 80px 0 40px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #B8C2CC;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 18px;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(123, 97, 255, 0.3);
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #B8C2CC;
    font-size: 14px;
}

/* Loading State */
.loading {
    display: none;
    text-align: center;
    margin: 30px 0;
    animation: fadeIn 0.6s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(123, 97, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    animation: spin 1.2s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 500;
}

.loading-text span {
    display: inline-block;
    animation: pulse 1.5s infinite;
}

.loading-text span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-text span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--light);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 16px 16px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        padding: 12px 25px;
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 150px 0 80px;
    }

    .hero h1 {
        font-size: 38px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 16px;
        padding: 0 20px;
    }

    .upload-container {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .image-preview {
        flex-direction: column;
        gap: 30px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    .features {
        padding: 80px 0;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 50px;
    }

    .feature-card {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Premium Comparison Block */
.premium-comparison {
    background-color: var(--light);
    border-radius: 20px;
    padding: 60px 40px;
    max-width: 1000px;
    margin: 60px auto;
    box-shadow: 0 15px 50px rgba(123, 97, 255, 0.08);
    border: 1px solid rgba(123, 97, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.premium-comparison::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.comparison-header {
    text-align: center;
    margin-bottom: 40px;
}

.comparison-header h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.comparison-header p {
    color: var(--text-light);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.comparison-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.comparison-card {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(123, 97, 255, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--gray);
}

.card-header i {
    font-size: 20px;
    color: var(--primary);
    background: rgba(123, 97, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.premium-comparison-image {
    width: 100%;
    height: auto;
    display: block;
    padding: 20px;
}

@media (max-width: 768px) {
    .premium-comparison {
        padding: 40px 20px;
        margin: 40px auto;
    }
    
    .comparison-header h3 {
        font-size: 26px;
    }
    
    .comparison-header p {
        font-size: 16px;
    }
}