:root {
    /* AMOLED dark mode with preserved colors */
    --text-color: #FFE4EC;
    --subheading-color: white;
    --placeholder-color: white;
    --primary-color: #000000;
    --secondary-color: #121212;
    --secondary-hover-color: #1A1A1A;
    --accent-color: #FF6294;
    --accent-secondary: #fd5d93;

    /* Optimized animations with reduced values */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-elastic: 0.3s cubic-bezier(0.68, -0.2, 0.32, 1.2);
    --hover-lift: -4px;
}

.light-mode {
    /* Light mode - preserving your color scheme */
    --text-color: #333333;
    --subheading-color: black;
    --placeholder-color: black;
    --primary-color: #FFFFFF;
    --secondary-color: #FDF2F7;
    --secondary-hover-color: #FADCE6;
    --accent-color: #f7a6c7;
    --accent-secondary: #ff89b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    /* Reduced transitions to only essential properties */
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: max(1rem, 4vw);
    overflow-x: hidden;
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    border: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    will-change: transform;
}

.theme-toggle:hover {
    background: var(--secondary-hover-color);
    transform: translateY(-2px);
}

.theme-toggle:active {
    transform: translateY(0);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    text-align: center;
    padding: 1rem;
}

.logo {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
    text-shadow: 0 0 10px rgba(255, 98, 148, 0.15);
    display: inline-block;
}

.description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
}

.product-card {
    background-color: var(--secondary-color);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    text-align: left;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(var(--hover-lift));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    transform: scaleX(0.7);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-name {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--subheading-color);
    position: relative;
    display: inline-block;
}

.product-description {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-size: 0.95rem;
    opacity: 0.85;
    flex-grow: 1;
}

.visit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 98, 148, 0.2);
    position: relative;
    overflow: hidden;
    align-self: flex-start;
    will-change: transform;
}

.visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 98, 148, 0.3);
}

.visit-btn:active {
    transform: translateY(0);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .container {
        padding: 0.5rem;
    }

    .product-card:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.8rem;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: 100%;
    }
}

/* Simplified animations for better performance */
.product-card:nth-child(1),
.product-card:nth-child(2),
.product-card:nth-child(3) {
    /* Remove floating animations that cause lag */
    animation: none;
}

/* Model comparison section optimized */
.model-comparison {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 20px;
    border: 3px solid var(--accent-secondary);
    color: var(--text-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.model-comparison h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.comparison-label {
    font-weight: 600;
    color: var(--subheading-color);
    padding: 0.8rem;
    background-color: var(--secondary-hover-color);
    border-radius: 12px;
}

.comparison-value {
    padding: 0.8rem;
    border-radius: 12px;
    background-color: var(--primary-color);
}

.turbo {
    color: #FFB2C9;
    font-weight: bold;
}

.ultra {
    color: #FF92B3;
    font-weight: bold;
}

.model-header {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-secondary);
    padding: 0.5rem;
    background-color: var(--secondary-hover-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.model-header div:first-child {
    text-align: left;
    color: var(--subheading-color);
}

/* Responsive model comparison section */
@media (max-width: 768px) {
    .comparison-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.8rem;
    }

    .model-header {
        grid-template-columns: 1fr;
    }

    .comparison-label,
    .comparison-value {
        background-color: var(--secondary-color);
        padding: 0.8rem;
        border-radius: 12px;
        font-size: 0.95rem;
    }

    .comparison-label {
        font-weight: bold;
        color: var(--accent-color);
    }

    .comparison-value.turbo {
        color: #ff9ab5;
        border-left: 3px solid #ff5c8d;
    }

    .comparison-value.ultra {
        color: #ffffff;
        border-left: 3px solid #ff0077;
        background-color: #1a1a1a;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(255, 98, 148, 0.2);
    }
}

/* Support section */
.support-container {
    background-color: var(--secondary-color);
    color: var(--text-color);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.support-heading {
    font-size: 1.6rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

.support-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--placeholder-color);
}

.donate-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0.7rem 1.4rem;
    font-weight: bold;
    border-radius: 2rem;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.donate-btn:hover {
    background-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--placeholder-color);
    margin-top: 2rem;
}

/* Add content visibility for better performance */
.product-card,
.model-comparison,
.support-container {
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
}

/* Remove unnecessary animations */
@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Only animate initial page load */
.container>* {
    animation: appear 0.25s forwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
}

.logo {
    --index: 1;
}

.description {
    --index: 2;
}

.products {
    --index: 3;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}