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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://i.ibb.co/7zVQ1zj/party-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: #fff;
    padding: 40px 20px;
    margin: 0;
    overflow: visible !important;
}

/* Add overlay to ensure text readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(16, 16, 20, 0.85),
        rgba(16, 16, 20, 0.95)
    );
    z-index: 0;
}

/* Ensure content stays above overlay */
.quiz-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
    z-index: 1;
    margin: 40px auto;
    overflow: visible;
}

/* Fallback background if image fails to load */
@supports not (background-image: url('/path/to/your/image.jpg')) {
    body {
        background: radial-gradient(
            circle at center,
            rgb(28, 28, 35) 0%,
            rgb(16, 16, 20) 100%
        );
    }
}

/* Add the new gradient variable */
:root {
    --gradient: conic-gradient(
        from 90deg at 50% 50%,
        #ff61f7,
        #9d4edd,
        #7b2cbf,
        #5a189a,
        #ff61f7
    );
}

/* Update the card styles */
.card {
    --start: 0;
    position: relative;
    background-color: rgb(16, 16, 20);
    border-radius: 14px;
    padding: 20px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.8s ease;
    margin: 20px;
}

.card::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 14px;
    border: 2px solid transparent;
    background: var(--gradient);
    background-attachment: fixed;
    mask: linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--start) - (20 * 1.1)) * 1deg),
            #ffffff1f 0deg,
            white,
            #ffffff00 100deg
        );
    mask-composite: intersect;
    mask-clip: padding-box, border-box;
    opacity: 0;
    transition: 0.5s ease;
    z-index: -1;
}

/* Add the glow effect */
.glow {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: blur(14px);
    z-index: -2;
}

.glow::before {
    position: absolute;
    content: "";
    width: 98%;
    height: 98%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 14px;
    border: 25px solid transparent;
    background: var(--gradient);
    background-attachment: fixed;
    mask: linear-gradient(#0000, #0000),
        conic-gradient(
            from calc((var(--start) - (20 * 1.1)) * 1deg),
            #ffffff1f 0deg,
            white,
            #ffffff00 100deg
        );
    mask-composite: intersect;
    mask-clip: padding-box, border-box;
    opacity: 0;
    transition: 0.5s ease;
}

/* Add hover effects */
.card:hover > .glow::before {
    opacity: 0.25;
}

.card:hover::before {
    opacity: 0.8;
}

/* Keep the card loaded animation */
.card.loaded {
    animation: cardEntrance 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 1;
}

.card-header {
    text-align: center;
    margin-bottom: 5px;
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.progress-container {
    width: 100%;
    max-width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #9d4edd, #7b2cbf);
    border-radius: 20px;
    transition: width 0.3s ease;
    width: 0;
}

.question-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.question-container {
    text-align: center;
    position: relative;
    padding-top: 10px;
    margin-top: 0;
}

.icon {
    font-size: 48px;
    margin-bottom: 15px;
}

#question-text {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.option-button {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 14px;
    text-align: left;
    width: 100%;
}

.option-button:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    box-shadow: none;
}

.option-button span:first-child {
    font-size: 20px;
}

.result-container {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-icon {
    font-size: 64px;
    margin-bottom: 25px;
    animation: pulse 2s infinite;
    margin-top: -50px;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.result-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.result-title .title-text {
    background: linear-gradient(45deg, #9d4edd, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-title .emoji {
    color: initial;  /* Reset color for emojis */
    -webkit-text-fill-color: initial;  /* Reset fill color for emojis */
}

.result-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.costume-ideas {
    margin: 25px 0;
}

.costume-ideas h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.costume-ideas p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.reset-button {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 14px;
    text-align: left;
    width: auto;
}

.reset-button:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    box-shadow: none;
}

.result-image {
    width: 100%;
    position: relative;
    padding-top: 56.25%;  /* 16:9 Aspect Ratio (9 / 16 = 0.5625 or 56.25%) */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.result-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    pointer-events: none;
}

@media (max-width: 480px) {
    .card {
        padding: 12px;
    }
    
    .title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    #question-text {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .option-button {
        padding: 10px 12px;
        font-size: 13px;
        gap: 8px;
    }
    
    .result-title {
        font-size: 28px;
    }
    
    .result-image {
        padding-top: 56.25%;
        height: auto;
        margin-bottom: 20px;
    }

    .unique-description {
        font-size: 16px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .icon {
        font-size: 34px;
        margin-bottom: 15px;
    }

    .quiz-container {
        padding: 10px 5px;
    }

    .costume-ideas {
        padding-top: 15px;
    }

    .costume-ideas h3 {
        font-size: 16px;
    }

    .costume-ideas p {
        font-size: 14px;
    }

    .reset-button {
        padding: 12px;
        font-size: 14px;
    }

    .pre-title {
        font-size: 13px;
        margin-bottom: 3px;
    }
}

/* Add a new breakpoint for very small devices */
@media (max-width: 350px) {
    .title {
        font-size: 18px;
    }
    
    #question-text {
        font-size: 14px;
    }
    
    .option-button {
        padding: 8px 12px;
    }
    
    .icon {
        font-size: 28px;
    }

    .back-button {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Add a medium breakpoint for tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .card {
        padding: 12px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .icon {
        font-size: 42px;
    }
    
    #question-text {
        font-size: 18px;
    }
    
    .options-container {
        gap: 10px;
    }
}

/* Add these new styles */
.pre-reveal-container {
    text-align: center;
    padding: 20px 15px;
    position: relative;
}

.pre-reveal-container h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reveal-button {
    padding: 15px 30px;
    font-size: 18px;
    background: linear-gradient(45deg, #9d4edd, #7b2cbf);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.reveal-button:hover {
    transform: none;
    box-shadow: none;
}

/* Add styles for back button */
.back-button {
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-button:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(-2px);
}

/* Add animation keyframes */
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Update dissolve filter for mobile compatibility */
#dissolve-filter {
    transform: translate3d(0, 0, 0);
    position: fixed;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    pointer-events: none;
}

/* Add this new style for the filtered elements */
.dissolve-element {
    position: relative;
    overflow: visible;
    filter: url(#dissolve-filter);
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.unique-description {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 500;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.party-intro {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    font-style: italic;
}

@media (max-width: 480px) {
    .unique-description {
        font-size: 19px;
        margin-bottom: 20px;
    }

    .party-intro {
        font-size: 14px;
        margin-bottom: 12px;
    }
}

/* Update result card styles */
.result-container {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.result-content {
    padding: 0;
    text-align: center;
}

.result-header {
    margin-bottom: 30px;
    text-align: center;
}

.unique-description {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
}

.party-section {
    margin: 20px auto;
    max-width: 500px;
}

.result-details {
    text-align: center;
    margin-bottom: 25px;
}

.costume-ideas {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin: 0 auto;
    max-width: 500px;
}

.reset-button {
    margin: 0 auto;
    display: inline-flex;
    justify-content: center;
}

.result-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(45deg, #9d4edd, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.2;
}

.result-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.party-intro {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-style: italic;
}

.result-title {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(45deg, #9d4edd, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.2;
}

.result-details {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 25px;
}

.result-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.costume-ideas {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.costume-ideas h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.costume-ideas p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 15px;
}


/* Mobile adjustments */
@media (max-width: 480px) {
    .result-image {
        height: 200px;
        margin-bottom: 20px;
    }

    .unique-description {
        font-size: 19px;
        margin-bottom: 20px;
    }

    .result-title {
        font-size: 28px;
    }

    .party-section {
        margin: 20px 0;
        padding-left: 12px;
    }

    .result-details {
        padding: 20px;
        margin-bottom: 25px;
    }

    .costume-ideas {
        padding-top: 15px;
    }

    .costume-ideas h3 {
        font-size: 16px;
    }

    .costume-ideas p {
        font-size: 14px;
    }

    .reset-button {
        padding: 12px;
        font-size: 14px;
    }
}

/* Update unique description styles */
.unique-description {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 500;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .unique-description {
        font-size: 19px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
}

.quiz-header {
    text-align: center;
    margin-bottom: 30px;
}

.quiz-header img {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .quiz-header img {
        max-width: 250px;
    }
}

.quiz-header-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 auto 15px;
    display: block;
}

@media (max-width: 480px) {
    .quiz-header-image {
        max-width: 250px;
        margin: 0 auto 12px;
    }
}

.inspiration {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.4;
}

.inspiration em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 480px) {
    .inspiration {
        font-size: 14px;
        margin-top: 15px;
    }
}

/* Update result image styles */
.result-image {
    width: 100%;
    position: relative;
    padding-top: 56.25%;  /* 16:9 Aspect Ratio */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.result-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    pointer-events: none;
}

/* Remove or update conflicting mobile styles */
@media (max-width: 480px) {
    .result-image {
        padding-top: 56.25%;  /* Keep aspect ratio */
        height: auto;  /* Remove fixed height */
        margin-bottom: 20px;
    }
}

/* Add styles for the pre-title */
.pre-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    letter-spacing: 1px;
    font-style: italic;
}

@media (max-width: 480px) {
    .pre-title {
        font-size: 12px;
        margin-bottom: 3px;
    }
}

/* Update pre-title styles to match option button text */
.pre-title {
    font-size: 14px;  /* Match option-button font size */
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    letter-spacing: 1px;
    font-style: italic;
}

@media (max-width: 480px) {
    .pre-title {
        font-size: 13px;  /* Match option-button mobile font size */
        margin-bottom: 3px;
    }
}

/* Add styles for start screen */
.start-screen {
    text-align: center;
    padding: 20px;  /* Add padding to the content */
}

.start-button {
    padding: 14px 30px;
    font-size: 16px;
    background: linear-gradient(45deg, #9d4edd, #7b2cbf);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(157, 78, 221, 0.4);
}

/* Update start screen specific styles */
.start-screen {
    text-align: center;
    padding: 20px;  /* Add padding to the content */
}

/* Larger pre-title only on start screen */
.card-header .pre-title {
    font-size: 18px;  /* Increased from 14px */
}

/* Add specific padding for start screen card */
.card.start-screen-active {
    padding: 40px;  /* Increased from 20px */
}

@media (max-width: 480px) {
    .card.start-screen-active {
        padding: 25px;  /* Slightly less padding on mobile */
    }
    
    .card-header .pre-title {
        font-size: 16px;  /* Slightly smaller on mobile */
    }
}

/* Update mobile adjustments */
@media (max-width: 480px) {
    body {
        padding: 20px 10px;
    }
    
    .quiz-container {
        margin: 20px auto;
    }
    
    .quiz-container::before {
        inset: -15px; /* Even smaller on mobile */
        filter: blur(12px); /* Smaller blur on mobile */
    }
    
    .card {
        margin: 10px;
    }
}

/* Add subtle movement on hover */
.card {
    transition: transform 0.3s ease, opacity 0.8s ease;
}

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