#loa-app-fullscreen-wrapper {
    all: initial;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#loa-app-fullscreen-wrapper *, #loa-app-fullscreen-wrapper *:before, #loa-app-fullscreen-wrapper *:after {
    box-sizing: border-box;
}
.loa-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #03050a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    padding: 20px;
    z-index: 999999;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Deep space nebula background */
.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 30%, rgba(43, 25, 94, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(15, 43, 89, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(10, 20, 40, 0.6) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars-small {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23ffffff' opacity='0.5'%3E%3Ccircle cx='20' cy='30' r='0.8'/%3E%3Ccircle cx='150' cy='80' r='1'/%3E%3Ccircle cx='250' cy='40' r='0.5'/%3E%3Ccircle cx='80' cy='200' r='0.8'/%3E%3Ccircle cx='350' cy='250' r='1'/%3E%3Ccircle cx='180' cy='350' r='0.5'/%3E%3Ccircle cx='40' cy='250' r='1'/%3E%3Ccircle cx='280' cy='180' r='0.8'/%3E%3Ccircle cx='320' cy='80' r='1'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 200px 200px;
    animation: twinkle-small 4s ease-in-out infinite alternate;
}

.stars-medium {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cg fill='%23ffffff' opacity='0.7'%3E%3Ccircle cx='100' cy='150' r='1.2'/%3E%3Ccircle cx='400' cy='50' r='1.5'/%3E%3Ccircle cx='250' cy='350' r='1.2'/%3E%3Ccircle cx='450' cy='250' r='1.5'/%3E%3Ccircle cx='50' cy='450' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 300px 300px;
    animation: twinkle-medium 7s ease-in-out infinite alternate;
}

.stars-large {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cg fill='%23ffffff' opacity='0.8'%3E%3Ccircle cx='120' cy='80' r='1.2'/%3E%3Ccircle cx='500' cy='120' r='1.5'/%3E%3Ccircle cx='300' cy='400' r='1.2'/%3E%3Ccircle cx='80' cy='520' r='1.6'/%3E%3Ccircle cx='480' cy='480' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 450px 450px;
    animation: twinkle-large 11s ease-in-out infinite alternate;
}

@keyframes twinkle-small {
    0% { opacity: 0.4; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}
@keyframes twinkle-medium {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}
@keyframes twinkle-large {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 0.85; transform: scale(1.05); }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 140px;
    height: 2px;
    background: linear-gradient(270deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    border-radius: 999px;
    filter: drop-shadow(0 0 8px #ffffff);
    opacity: 0;
    transform-origin: right center;
}

.shooting-star::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.9);
}

/* 18-Second Master Loop Timing */
.star-1 {
    top: 10%;
    left: 5%;
    animation: shoot 18s infinite 1s;
}

.star-2 {
    top: -10%;
    left: 30%;
    animation: shoot 18s infinite 4s;
}

.star-3 {
    top: 25%;
    left: -5%;
    animation: shoot 18s infinite 10s;
}

@keyframes shoot {
    0% { transform: rotate(45deg) translateX(0); opacity: 1; }
    5% { transform: rotate(45deg) translateX(150vw); opacity: 0; }
    100% { transform: rotate(45deg) translateX(150vw); opacity: 0; }
}

.loa-inner-box {
    position: relative;
    width: 100%;
    max-width: 750px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 2;
}

/* MASSIVE H1 HEADINGS & OVERALL HUGE TEXT */
.loa-title-h1 {
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: #ffe600;
    margin: 0 0 10px 0;
    font-weight: 900;
    text-shadow: 0 0 18px rgba(255,230,0,0.8);
}
.loa-main-h1 {
    font-size: 3rem; 
    line-height: 1.2;
    margin: 0 0 20px 0;
    font-weight: 900;
    text-shadow: 0 4px 12px rgba(0,0,0,0.8);
    color: #ffffff;
}
.loa-question-text {
    font-size: 2.1rem; 
    line-height: 1.35;
    margin: 0 0 25px 0;
    font-weight: 800;
    color: #fffae6;
    text-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

/* Input Screen Styling */
.loa-input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 10px;
}
.loa-textarea {
    width: 100%;
    height: 220px; 
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    font-size: 1.7rem; 
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}
.loa-textarea:focus {
    border-color: #ffe600;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 35px rgba(255, 230, 0, 0.5);
}
.loa-textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

/* Card Interaction Area */
.loa-card-stack {
    position: relative;
    width: 100%;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    perspective: 1000px;
}
.loa-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 30, 0.90); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15), 0 0 45px rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    user-select: none;
}
.loa-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 230, 0, 0.9);
}
.loa-card .emoji {
    font-size: 5rem;
    margin-bottom: 15px;
    pointer-events: none;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.6));
}
.loa-card .card-text {
    font-size: 1.8rem; 
    line-height: 1.4;
    margin: 0;
    font-weight: 800;
    color: #ffffff;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Large Bold Buttons */
.loa-btn {
    width: 100%;
    background: linear-gradient(135deg, #ffcc00 0%, #ff6600 100%);
    color: #0c0714;
    border: none;
    padding: 22px;
    border-radius: 22px;
    font-size: 1.6rem; 
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(255,102,0,0.6);
    transition: transform 0.1s ease, filter 0.2s ease, box-shadow 0.2s ease;
    letter-spacing: 0.5px;
}
.loa-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 20px 40px rgba(255,102,0,0.8);
}
.loa-btn:active {
    transform: scale(0.97);
}

/* JAZZED UP GREEN BLEND BOOKMARK BUTTON */
.loa-btn-bookmark {
    background: linear-gradient(135deg, #85ffaa 0%, #00cc66 40%, #009933 100%);
    color: #071c12 !important;
    border: 3px solid #b3ffcc;
    font-size: 1.7rem !important;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(0, 204, 102, 0.5), inset 0 0 12px rgba(255, 255, 255, 0.6);
    animation: bookmarkPulse 2.2s ease-in-out infinite alternate;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}
@keyframes bookmarkPulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 204, 102, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.5); }
    100% { transform: scale(1.02); box-shadow: 0 0 28px rgba(0, 255, 128, 0.8), inset 0 0 16px rgba(255, 255, 255, 0.9); }
}
.loa-btn-bookmark:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 35px rgba(0, 255, 128, 1);
}

/* COSMIC PINK/PURPLE-TO-GOLD GLOW FREEDOM BUTTON */
.loa-btn-business {
    background: linear-gradient(135deg, #e685ff 0%, #ff0080 40%, #ffcc00 100%);
    color: #120822 !important;
    border: 3px solid #ffed4a;
    font-size: 1.8rem !important;
    font-weight: 900;
    box-shadow: 0 0 22px rgba(255, 0, 128, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.6);
    animation: cosmicUnlockedPulse 2s ease-in-out infinite alternate;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}
@keyframes cosmicUnlockedPulse {
    0% { transform: scale(1); box-shadow: 0 0 18px rgba(255, 0, 128, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.5); }
    100% { transform: scale(1.02); box-shadow: 0 0 32px rgba(255, 204, 0, 0.8), 0 0 50px rgba(230, 133, 255, 0.7), inset 0 0 18px rgba(255, 255, 255, 0.9); }
}
.loa-btn-business:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 40px rgba(255, 230, 0, 1);
}

/* GLOWING BLUE SHARE BUTTON */
.loa-btn-share {
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 40%, #0033cc 100%);
    color: #ffffff !important;
    border: 3px solid #80dfff;
    font-size: 1.7rem !important;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.4);
    animation: sharePulse 2s ease-in-out infinite alternate;
    text-shadow: 0 1px 2px rgba(0, 100, 200, 0.8);
}
@keyframes sharePulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 212, 255, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3); }
    100% { transform: scale(1.02); box-shadow: 0 0 28px rgba(0, 255, 255, 0.8), inset 0 0 16px rgba(255, 255, 255, 0.6); }
}
.loa-btn-share:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 35px rgba(0, 255, 255, 1);
}

/* Completion Screen & Fireworks */
.loa-completion {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}
.firework-burst {
    position: relative;
    font-size: 6rem;
    margin-bottom: 10px;
    animation: fireworkExplosion 1.5s ease-out infinite alternate;
}
@keyframes fireworkExplosion {
    0% { transform: scale(0.8); filter: drop-shadow(0 0 10px rgba(255,204,0,0.4)); }
    100% { transform: scale(1.3); filter: drop-shadow(0 0 45px rgba(255,204,0,1)) drop-shadow(0 0 80px rgba(0,198,255,0.8)); }
}
.loa-completion h1 {
    font-size: 2.8rem;
    margin: 0 0 15px 0;
    color: #ffcc00;
    text-shadow: 0 0 25px rgba(255,204,0,0.7);
}
.habit-builder-box {
    background: rgba(255, 204, 0, 0.16);
    padding: 22px;
    border-radius: 24px;
    margin-bottom: 20px;
    width: 100%;
    border: 3px dashed rgba(255, 204, 0, 0.7);
    box-shadow: inset 0 0 25px rgba(255, 204, 0, 0.2);
}
.habit-builder-box p {
    margin: 0;
    font-size: 1.5rem !important;
    color: #ffed4a !important;
    font-weight: 900;
    line-height: 1.5;
}
.loa-action-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* ============ MOBILE RESPONSIVE FIXES ============ */
@media (max-width: 768px) {
    .loa-container {
        padding: 12px;
        justify-content: flex-start;
        min-height: 100vh;
    }
    
    .loa-inner-box {
        width: 100%;
        max-width: 100%;
    }

    /* Title adjustments */
    .loa-title-h1 {
        font-size: 1.2rem;
        letter-spacing: 3px;
        margin: 0 0 6px 0;
    }
    
    .loa-main-h1 {
        font-size: 1.8rem;
        line-height: 1.25;
        margin: 0 0 12px 0;
    }
    
    .loa-question-text {
        font-size: 1.3rem;
        line-height: 1.4;
        margin: 0 0 16px 0;
    }

    /* Input group */
    .loa-input-group {
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .loa-textarea {
        height: 160px;
        font-size: 1.1rem;
        padding: 16px;
        border-radius: 16px;
    }

    /* Card stack - reduce height on mobile */
    .loa-card-stack {
        height: auto;
        min-height: 280px;
        margin: 12px 0;
        perspective: 800px;
    }
    
    .loa-card {
        padding: 24px 16px;
        border-radius: 20px;
    }
    
    .loa-card .emoji {
        font-size: 3.5rem;
        margin-bottom: 10px;
    }
    
    .loa-card .card-text {
        font-size: 1.15rem;
        line-height: 1.45;
    }

    /* Buttons */
    .loa-btn {
        padding: 16px;
        font-size: 1.15rem;
        border-radius: 16px;
    }
    
    .loa-btn-bookmark {
        font-size: 1.2rem !important;
    }
    
    .loa-btn-business {
        font-size: 1.25rem !important;
    }
    
    .loa-btn-share {
        font-size: 1.2rem !important;
    }

    /* Completion screen */
    .firework-burst {
        font-size: 4rem;
    }
    
    .loa-completion h1 {
        font-size: 1.8rem;
        margin: 0 0 10px 0;
    }
    
    #completionPersonalText {
        font-size: 1.1rem !important;
    }
    
    .habit-builder-box {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 14px;
    }
    
    .habit-builder-box p {
        font-size: 1.1rem !important;
        line-height: 1.5;
    }
    
    .loa-action-grid {
        gap: 10px;
    }

    /* Cooldown screen */
    #viewStepCooldown h1 {
        font-size: 1.7rem !important;
    }
    
    #viewStepCooldown p {
        font-size: 1.1rem !important;
    }
    
    #cooldownTimerText {
        font-size: 1.1rem !important;
    }

    /* Bottom text - ensure visibility */
    .loa-container > div:last-child {
        padding-bottom: 16px;
        flex-shrink: 0;
        margin-top: auto;
    }
    
    .loa-container > div:last-child > div:first-child {
        font-size: 0.85rem !important;
    }
    
    .loa-container > div:last-child > div:last-child {
        font-size: 0.75rem !important;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .loa-container {
        padding: 8px;
    }
    
    .loa-title-h1 {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .loa-main-h1 {
        font-size: 1.5rem;
    }
    
    .loa-question-text {
        font-size: 1.1rem;
    }
    
    .loa-textarea {
        height: 140px;
        font-size: 1rem;
        padding: 14px;
    }
    
    .loa-card-stack {
        min-height: 240px;
    }
    
    .loa-card {
        padding: 20px 12px;
    }
    
    .loa-card .emoji {
        font-size: 3rem;
    }
    
    .loa-card .card-text {
        font-size: 1rem;
    }
    
    .loa-btn {
        padding: 14px;
        font-size: 1rem;
    }
    
    .loa-btn-bookmark {
        font-size: 1.05rem !important;
    }
    
    .loa-btn-business {
        font-size: 1.1rem !important;
    }
    
    .loa-btn-share {
        font-size: 1.05rem !important;
    }
    
    .firework-burst {
        font-size: 3rem;
    }
    
    .loa-completion h1 {
        font-size: 1.5rem;
    }
    
    #completionPersonalText {
        font-size: 1rem !important;
    }
    
    .habit-builder-box p {
        font-size: 1rem !important;
    }
    
    #viewStepCooldown h1 {
        font-size: 1.4rem !important;
    }
    
    #viewStepCooldown p {
        font-size: 1rem !important;
    }
    
    .loa-container > div:last-child > div:first-child {
        font-size: 0.75rem !important;
    }
    
    .loa-container > div:last-child > div:last-child {
        font-size: 0.7rem !important;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .loa-container {
        padding: 8px 12px;
        justify-content: flex-start;
    }
    
    .loa-title-h1 {
        font-size: 0.9rem;
        margin: 0 0 4px 0;
    }
    
    .loa-main-h1 {
        font-size: 1.3rem;
        margin: 0 0 8px 0;
    }
    
    .loa-question-text {
        font-size: 1rem;
        margin: 0 0 10px 0;
    }
    
    .loa-input-group {
        gap: 8px;
    }
    
    .loa-textarea {
        height: 100px;
        font-size: 1rem;
    }
    
    .loa-card-stack {
        min-height: 180px;
        margin: 8px 0;
    }
    
    .loa-card {
        padding: 16px 12px;
    }
    
    .loa-card .emoji {
        font-size: 2.5rem;
        margin-bottom: 6px;
    }
    
    .loa-card .card-text {
        font-size: 0.95rem;
    }
    
    .loa-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .firework-burst {
        font-size: 2.5rem;
        margin-bottom: 6px;
    }
    
    .loa-completion h1 {
        font-size: 1.3rem;
        margin: 0 0 6px 0;
    }
    
    .habit-builder-box {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .habit-builder-box p {
        font-size: 0.95rem !important;
    }
    
    .loa-action-grid {
        gap: 8px;
    }
    
    .loa-container > div:last-child {
        padding-bottom: 8px;
    }
}