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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0e27;
    color: #fff;
    overflow-x: hidden;
}

/* Cosmic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(88, 28, 135, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(29, 78, 216, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
    z-index: -1;
}

/* Stars effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 50%, white, transparent),
        radial-gradient(1px 1px at 75% 80%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    opacity: 0.4;
    z-index: -1;
    animation: stars 20s ease-in-out infinite;
}

@keyframes stars {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }
}

/* Navigation */
.navbar {
    padding: 1rem 2rem;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(75deg, #00bce6, #2962ff 50.31%, #d500f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.btn-primary {
    background: linear-gradient(75deg, #00bce6, #2962ff 50.31%, #d500f9);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    opacity: .75;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Quiz Container */
.quiz-container {
    margin-top: 80px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

.quiz-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* Quiz Stage */
.quiz-stage {
    display: none;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.quiz-stage.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.stage-content {
    /* display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center; */
    min-height: 70vh;
}

.question-section {
    padding: 2rem;
    width: 100%;
}

.stage-indicator {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.answer-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateX(10px);
}

.answer-text {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.answer-description {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.image-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    max-width: 500px;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Final Stage */
.final-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.final-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.final-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.code-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.code-output {
    width: 100%;
    height: 220px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #a5b4fc;
    resize: none;
    line-height: 1.6;
    /* filter: blur(10px); */
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    /* background: #0d0d0d; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: 0.5s;
}

.blur-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.copy-btn {
    padding: 0.5rem 1.5rem !important;
    position: absolute;
    left: 50%;
    bottom: 10px;
    ;
    transform: translate(-50%, 0);
    opacity: 1;
}


.copy-btn.hidden {
    opacity: 0;
}

.generate-btn {
    background: linear-gradient(75deg, #00bce6, #2962ff 50.31%, #d500f9);
    color: #fff;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 15px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.generate-btn.loading .btn-text {
    opacity: 1;
}

.generate-btn.loading .loader {
    opacity: 1;
    width: 24px;
    height: 24px;
}

.loader {

    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;

    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(75deg, #00bce6, #2962ff 50.31%, #d500f9);
    width: 0%;
    transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 968px) {
    .stage-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .question-title {
        font-size: 2rem;
    }

    .final-title {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        display: none;
    }

    .image-section {
        order: -1;
    }

    .image-placeholder {
        height: 300px;
    }
}