/* premium.css */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Orbitron:wght@400;500;700;900&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.015);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shine: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --liquid-refraction: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05));
}

/* Color Themes */
body.theme-purple {
    --accent-glow: #9154ff;
    --accent-secondary: #bd00ff;
}

body.theme-green {
    --accent-glow: #00e68c;
    --accent-secondary: #00e68c;
}

body.theme-blue {
    --accent-glow: #00bcff;
    --accent-secondary: #0060ff;
}

body.theme-yellow {
    --accent-glow: #ffce00;
    --accent-secondary: #ff8c00;
}

/* Animations */
@keyframes neon-title {

    0%,
    100% {
        clip-path: polygon(0% 51%, 13% 48%, 26% 50%, 37% 53%, 50% 55%, 61% 58%, 76% 60%, 91% 59%, 100% 51%, 100% 100%, 0 100%);
    }

    50% {
        clip-path: polygon(0 51%, 9% 57%, 21% 62%, 36% 63%, 49% 57%, 60% 50%, 75% 46%, 91% 44%, 100% 42%, 100% 100%, 0 100%);
    }
}

@keyframes wave {

    0%,
    100% {
        clip-path: polygon(0% 51%, 13% 48%, 26% 50%, 37% 53%, 50% 55%, 61% 58%, 76% 60%, 91% 59%, 100% 51%, 100% 100%, 0 100%);
    }

    50% {
        clip-path: polygon(0 51%, 9% 57%, 21% 62%, 36% 63%, 49% 57%, 60% 50%, 75% 46%, 91% 44%, 100% 42%, 100% 100%, 0 100%);
    }
}

/* Liquid Glass Core Utility */
.liquid-glass {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(200%) contrast(95%);
    -webkit-backdrop-filter: blur(25px) saturate(200%) contrast(95%);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-shine);
    overflow: hidden;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        inset 0 0 100px rgba(255, 255, 255, 0.02);
}

.liquid-glass::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    opacity: 0.15;
    pointer-events: none;
    animation: liquid-flow 15s ease infinite alternate;
    z-index: 0;
}

@keyframes liquid-flow {
    0% {
        transform: translate(-5%, -5%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(5%, 5%) rotate(5deg) scale(1.1);
    }

    100% {
        transform: translate(-5%, -5%) rotate(-5deg) scale(1);
    }
}

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

body {
    font-family: 'Lato', sans-serif;
    background: #050505;
    /* Fallback */
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

canvas#webgl-canvas,
.webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

.webgl canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100vh;
}

/* --- Premium Layout --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 80px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background: rgba(var(--accent-glow), 0.15);
    border-color: var(--accent-glow);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateX(4px);
}

/* Header & Hero Area */
.mbti-header {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 25;
    pointer-events: none;
}

.mbti-title {
    position: relative;
    height: clamp(60px, 12vw, 120px);
    width: 100%;
}

.mbti-title h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent-glow);
    text-shadow: 0 0 30px var(--accent-glow);
    white-space: nowrap;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mbti-title h1:nth-child(2) {
    color: var(--accent-glow);
    animation: neon-title 3s ease-in-out infinite;
    -webkit-text-fill-color: var(--accent-glow);
    z-index: 2;
}

.mbti-title.short h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
}

.mbti-title.long h1 {
    font-size: clamp(1.8rem, 6vw, 4rem);
}

.mbti-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    color: var(--accent-glow);
    text-transform: uppercase;
    letter-spacing: clamp(2px, 1vw, 6px);
    font-weight: 700;
    margin: -10px 0 0;
    opacity: 0.95;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Cards / Sections */
.section {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(200%) brightness(0.85);
    -webkit-backdrop-filter: blur(30px) saturate(200%) brightness(0.85);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-shine);
    border-radius: 28px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        inset 0 0 80px rgba(255, 255, 255, 0.015);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--liquid-refraction);
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    opacity: 0.6;
    z-index: 3;
}

.section:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 40px 70px -15px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(var(--accent-glow), 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 30px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 32px;
    background: var(--accent-glow);
    box-shadow: 0 0 10px var(--accent-glow);
    border-radius: 4px;
}

.section-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.05);
    /* 95% transparent */
    backdrop-filter: blur(5px);
    border: 1px solid var(--accent-glow);
    padding: 30px;
    border-radius: 16px;
    margin-top: 20px;
}

.section-content p {
    margin-bottom: 20px;
}

.section-content ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.section-content li {
    background: transparent;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 2px solid var(--glass-border);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.section-content li:hover {
    background: rgba(255, 255, 255, 0.01) !important;
    border-left-color: var(--accent-glow);
    padding-left: 25px;
    color: white;
}

/* Mobile Styling */
@media (max-width: 768px) {
    .mbti-title {
        font-size: 3.5rem;
    }

    .section {
        padding: 30px 20px;
    }

    .section-content ul {
        grid-template-columns: 1fr;
    }
}

/* --- Product Cards --- */

.products-section {
    position: relative;
    padding-bottom: 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    /* 95% transparent */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--accent-glow);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--liquid-refraction);
    opacity: 0.05;
    pointer-events: none;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    opacity: 0.4;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-glow);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.product-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.product-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-price {
    display: block;
    font-size: 1.1rem;
    color: var(--accent-glow);
    font-weight: 700;
}

.original-price {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 0.9rem;
    margin-right: 8px;
    color: var(--text-main);
}

.product-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-headline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-subhead {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-style: italic;
}

.product-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes CTA to bottom */
}

.product-cta {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-secondary));
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.product-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-glow), 0.4);
    filter: brightness(1.2);
}

/* Mobile Adjustments for Products */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}


.mbti-hero-visual {
    width: 100%;
    max-width: 1000px;
    height: clamp(150px, 25vw, 250px);
    margin: 40px 0;
    position: relative;
    z-index: 1;
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-bg-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: inherit;
}

.hero-bg-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(5, 5, 5, 0.8));
    z-index: 1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: transform 0.5s ease;
}

.mbti-hero-visual:hover .hero-bg {
    transform: scale(1.05);
}

.hero-character {
    position: absolute;
    right: 2%;
    bottom: -68px;
    height: 126%;
    max-height: 450px;
    z-index: 20;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mbti-hero-visual:hover .hero-character {
    transform: translateY(-10px) scale(1.05);
    filter: drop-shadow(0 0 30px var(--accent-glow));
}

@media (max-width: 768px) {
    .container {
        padding-top: 40px;
    }

    .mbti-hero-visual {
        height: 160px;
        margin: 20px 0 40px;
    }

    .hero-character {
        height: 108%;
        bottom: -58px;
        right: -10px;
    }
}

.section:first-of-type {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Hero character image */
.hero-character {
    position: absolute;
    right: 2%;
    bottom: -78px;
    height: 144%;
    max-height: 360px;
    z-index: 15;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 768px) {
    .hero-character {
        height: 126%;
        bottom: -58px;
        right: -10px;
        max-height: 270px;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
    animation: bounce 2s infinite;
}

.scroll-indicator:hover {
    color: var(--accent-glow);
}

.scroll-indicator svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}