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

html {
    background: #0a0a0a;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    color: #fff;
}

.container {
    width: 100%;
    max-width: 600px;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* Intro Screen */
#intro {
    text-align: center;
}

.logo {
    display: none;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1rem;
    color: #888;
    margin-bottom: 10px;
    font-weight: 300;
}

.disclaimer {
    font-size: 0.75rem;
    color: #555;
    font-style: italic;
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn.primary {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.btn.secondary {
    background: transparent;
    border: 1px solid #444;
    color: #999;
}

.btn.secondary:hover {
    border-color: #666;
    color: #fff;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 12px;
}

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

.progress-text {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Quiz Screen */
#questionContainer {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 40px 35px;
}

#questionText {
    font-size: 1.3rem;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 300;
    color: #eee;
}

#optionsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    padding: 18px 25px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #bbb;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-weight: 300;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateX(8px);
}

.option-btn:active {
    transform: translateX(4px);
}

/* Analyzing Screen */
#analyzing {
    text-align: center;
}

.analyzing-content {
    padding: 60px;
}

.analyzing-content h2 {
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

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

#analyzingText {
    color: #555;
    font-style: italic;
    font-size: 0.85rem;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Results Screen */
.results-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 50px 35px;
    text-align: center;
}

.result-icon {
    font-size: 50px;
    margin-bottom: 25px;
    filter: grayscale(100%);
    animation: bounce 0.6s ease;
}

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

#resultTitle {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    font-weight: 400;
}

#resultType {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

#resultDescription {
    font-size: 1rem;
    line-height: 1.7;
    color: #999;
    margin-bottom: 35px;
    font-weight: 300;
}

.result-traits, .result-advice {
    text-align: left;
    margin-bottom: 25px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.result-traits h4, .result-advice h4 {
    color: #888;
    margin-bottom: 15px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

#resultTraits {
    list-style: none;
    padding-left: 0;
}

#resultTraits li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 0.9rem;
    font-weight: 300;
}

#resultTraits li:last-child {
    border-bottom: none;
}

#resultAdvice {
    color: #777;
    line-height: 1.6;
    font-style: italic;
    font-size: 0.95rem;
    font-weight: 300;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.button-group .btn {
    padding: 12px 28px;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }
    
    .logo {
        font-size: 45px;
    }
    
    #questionText {
        font-size: 1.1rem;
    }
    
    #questionContainer {
        padding: 30px 25px;
    }
    
    .results-content {
        padding: 35px 25px;
    }
    
    #resultType {
        font-size: 1.3rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

/* Copied toast animation */
.copied {
    animation: copiedPulse 0.3s ease;
}

@keyframes copiedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Easter Egg Hotspot */
.easter-egg-hotspot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0;
    background: rgba(180, 180, 180, 0.2);
    border: none;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.easter-egg-hotspot.active {
    opacity: 1;
    background: rgba(180, 180, 180, 0.25);
}

.easter-egg-hotspot.active:hover {
    opacity: 1;
    background: rgba(220, 220, 220, 0.35);
}

#questionContainer {
    position: relative;
}

/* Story Modal */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.story-modal.hidden {
    display: none;
}

.story-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.story-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: Helvetica, Arial, sans-serif;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
}

.story-header h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.story-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.story-close-btn:hover {
    color: #999;
}

.story-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.story-from-header {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 500;
}

.story-message {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: messageSlide 0.4s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-message.ending {
    border-left-color: #888;
    color: #999;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    font-style: italic;
}

.story-message.death {
    border-left-color: #444;
    color: #777;
    background: rgba(0, 0, 0, 0.4);
}

.story-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.story-choice-btn {
    padding: 14px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #999;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-family: Helvetica, Arial, sans-serif;
}

.story-choice-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.story-outcome {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 500;
}

.story-controls {
    padding: 10px 25px 15px;
    text-align: center;
}

.story-controls .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
}
