:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --transition-speed: 0.3s;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--light-color);
    background-color: var(--dark-color);
    overflow-x: hidden;
    line-height: 1.6;
}

.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    opacity: 0.05;
}

.mesh-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.6), transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.5), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.6), transparent 50%),
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.4), transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(34, 211, 238, 0.4), transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(125, 211, 252, 0.5), transparent 35%);
    animation: gradientMorph 25s ease infinite, glowPulse 8s ease-in-out infinite alternate;
    background-color: var(--dark-color);
    filter: blur(60px) saturate(150%);
    z-index: -2;
    transform-origin: center center;
}

.mesh-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 40% 50%, rgba(99, 102, 241, 0.4), transparent 70%),
        radial-gradient(circle at 60% 40%, rgba(236, 72, 153, 0.4), transparent 70%),
        radial-gradient(circle at 10% 80%, rgba(251, 113, 133, 0.3), transparent 60%),
        radial-gradient(circle at 80% 10%, rgba(79, 70, 229, 0.3), transparent 60%);
    animation: gradientOverlayMorph 30s ease infinite alternate, floatEffect 15s ease-in-out infinite;
    filter: blur(50px);
    opacity: 0.8;
    z-index: -1;
}

@keyframes gradientMorph {
    0% {
        transform: rotate(0deg) scale(1) translate(0%, 0%);
    }
    25% {
        transform: rotate(1deg) scale(1.05) translate(2%, -2%);
    }
    50% {
        transform: rotate(0deg) scale(1.1) translate(0%, 3%);
    }
    75% {
        transform: rotate(-1deg) scale(1.05) translate(-2%, -1%);
    }
    100% {
        transform: rotate(0deg) scale(1) translate(0%, 0%);
    }
}

@keyframes gradientOverlayMorph {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(3%, -2%) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-3%, 2%) scale(1.15);
        opacity: 0.7;
    }
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
}

@keyframes glowPulse {
    0% {
        filter: blur(60px) saturate(150%) hue-rotate(0deg);
    }
    50% {
        filter: blur(70px) saturate(180%) brightness(1.1) hue-rotate(15deg);
    }
    100% {
        filter: blur(60px) saturate(150%) hue-rotate(0deg);
    }
}

@keyframes floatEffect {
    0% {
        transform: translateY(0) translateX(0);
        filter: hue-rotate(0deg);
    }
    33% {
        transform: translateY(-10px) translateX(8px);
        filter: hue-rotate(10deg);
    }
    66% {
        transform: translateY(8px) translateX(-10px);
        filter: hue-rotate(20deg);
    }
    100% {
        transform: translateY(0) translateX(0);
        filter: hue-rotate(0deg);
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1.5s forwards;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    color: transparent;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    position: relative;
    transform: perspective(300px) rotateX(0deg);
    transition: transform 0.5s ease;
    text-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

h1:hover {
    transform: perspective(300px) rotateX(5deg);
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

h3 {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
}

.section {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    transition: all 0.5s ease;
    opacity: 0;
    animation: fadeInUp 1.5s 0.5s forwards;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, 
        rgba(99, 102, 241, 0.1), 
        rgba(139, 92, 246, 0.1), 
        rgba(236, 72, 153, 0.1), 
        rgba(34, 211, 238, 0.1));
    z-index: -1;
    filter: blur(20px);
    border-radius: 24px;
    opacity: 0.6;
}

.hidden {
    display: none;
}

.intro-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.8;
    position: relative;
}

.btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 7px 25px rgba(99, 102, 241, 0.8);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
}

.progress-container {
    margin-bottom: 2rem;
    position: relative;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.question-counter {
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.8;
}

.question {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s;
}

.question h3 {
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option.selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.option.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 5px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.option:active::after {
    opacity: 1;
}

.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.result-card {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    animation: fadeInUp 1s;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15), transparent 70%);
    animation: rotate 15s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.result-type {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: transparent;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    letter-spacing: 3px;
}

.result-title {
    margin-bottom: 1.5rem;
}

.result-title h3 {
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.result-title h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.camera-recommendation {
    margin: 2.5rem 0;
    position: relative;
}

.camera-recommendation img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease;
    cursor: pointer;
}

.camera-recommendation img:hover {
    transform: scale(1.03);
}

.camera-recommendation h4 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.result-description {
    text-align: left;
    line-height: 1.8;
    font-size: 1.1rem;
    padding: 0 0.5rem;
}

.result-details {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.result-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
}

.result-label {
    font-weight: 700;
    width: 30px;
    text-align: center;
    font-size: 1.1rem;
}

.bar-container {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
}

.bar {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

footer {
    text-align: center;
    padding: 2rem 0;
    opacity: 0.8;
    margin-top: auto;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .section {
        padding: 1.8rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .option {
        padding: 1rem;
    }

    .result-type {
        font-size: 2.5rem;
    }

    .result-description {
        font-size: 0.9rem;
    }

    .result-card {
        padding: 1.5rem;
    }

    .camera-recommendation img {
        height: 150px;
    }

    .mesh-gradient {
        filter: blur(40px) saturate(120%);
    }

    .mesh-gradient-overlay {
        filter: blur(35px);
        opacity: 0.7;
    }

    .mesh-dots {
        background-size: 15px 15px, 45px 45px;
        opacity: 0.15;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .section {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .question h3 {
        font-size: 1.1rem;
    }

    .option {
        padding: 1rem 0.8rem;
        font-size: 0.95rem;
    }

    .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .result-type {
        font-size: 2.3rem;
    }

    .result-title h3 {
        font-size: 1.4rem;
    }

    .camera-recommendation h4 {
        font-size: 1.3rem;
    }

    .result-description {
        font-size: 0.95rem;
        padding: 0;
    }

    .result-details {
        padding: 1.2rem 0.8rem;
    }

    .result-label {
        font-size: 1rem;
        width: 25px;
    }
}

.photo-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    opacity: 0.06;
    z-index: -2;
    pointer-events: none;
}

.photo-grid-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.loading {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mesh-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.07;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: -1;
}

.mesh-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px, 60px 60px;
    background-position: 0 0, 30px 30px;
    animation: dotsFloat 120s linear infinite;
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

@keyframes dotsFloat {
    0% {
        background-position: 0 0, 30px 30px;
    }
    100% {
        background-position: 100px 100px, 130px 130px;
    }
}