:root {
    /* WooCommerce scheme */
    --woocommerce: #720eec;
    --wc-green: #7ad03a;
    --wc-red: #a00;
    --wc-orange: #ffba00;
    --wc-blue: #2ea2cc;
    --wc-primary: #720eec;
    --wc-primary-text: #fcfbfe;
    --wc-secondary: #e9e6ed;
    --wc-secondary-text: #515151;
    --wc-highlight: #958e09;
    --wc-highligh-text: white;
    --wc-content-bg: #fff;
    --wc-subtext: #767676;
    --wc-form-border-color: rgba(32, 7, 7, 0.8);
    --wc-form-border-radius: 4px;
    --wc-form-border-width: 1px;

    /* Theme mappings */
    --bg-color: #ebebeb;
    /* Light grey background like reference */
    --card-bg: #ffffff;
    /* Solid white cards */

    --text-primary: #333333;
    /* Dark text for readability on white */
    --text-secondary: #666666;

    --accent-primary: var(--wc-primary);
    --accent-secondary: var(--wc-blue);
    --accent-tertiary: var(--wc-green);

    --accent-glow: rgba(114, 14, 236, 0.3);
    /* Purple glow based on WC Primary */

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Legacy keeping */
    --primary-color: var(--accent-primary);
    --secondary-color: var(--accent-secondary);
    --text-color: var(--text-primary);
    --glass-bg: var(--card-bg);
    --glass-border: rgba(0, 0, 0, 0.08);
    /* Dark subtle border for glass */
    --card-radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.alpha-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffcc00;
    color: #000;
    text-align: center;
    padding: 0.5rem;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Animated Background Grid & Glowing Orb */
.background-blobs {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(114, 14, 236, 0.05) 0%, rgba(46, 162, 204, 0.02) 40%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
    animation: orbPulse 8s ease-in-out infinite alternate;
}

@keyframes orbPulse {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

body::before {
    display: none;
    /* Remove background grids/gradients to match clean reference */
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    margin: 0 auto;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header {
    margin-bottom: 3rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--primary-color);
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.drop-zone,
.preview-container,
.result-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 3rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.drop-zone {
    cursor: pointer;
    border-style: dashed;
}

.drop-zone:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.drop-zone .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin: 0.5rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #767676;
    /* Solid grey */
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #515151;
    /* Darker grey */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333333;
    border: 1px solid #cccccc;
}

.btn-secondary:hover {
    background: #cccccc;
}

#imagePreview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #eee;
    /* Updated to contrast with white bg */
    border-bottom-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #767676;
    width: 0%;
    transition: width 0.5s ease;
}

/* History Vault Grid Styling */
#historyGrid div:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    border: 1px solid rgba(255, 0, 255, 0.5);
}

.viewer-container {
    width: 100%;
    height: 600px;
    /* Fixed height for the container */
    position: relative;
}

model-viewer {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    margin-bottom: 2rem;
    display: block;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1rem;
    }

    .drop-zone,
    .preview-container,
    .result-section {
        padding: 1.5rem;
    }
}

/* Selection Hub */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.card p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.back-link {
    text-align: left;
    margin-bottom: 1rem;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}