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

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('./public/5frhfv.jpeg') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 20, 40, 0.7);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.app-container {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    padding: 20px 15px;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.output {
    flex: 1;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    padding-right: 10px;
    font-weight: 400;
    overflow-wrap: break-word;
    hyphens: auto;
}

.input-section {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.options-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5), rgba(233, 236, 239, 0.5));
    color: #2c3e50;
    border: 2px solid rgba(222, 226, 230, 0.5);
    border-radius: 16px;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    backdrop-filter: blur(10px);
}

.option-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.7), rgba(0, 204, 106, 0.7));
    color: #000;
    border-color: rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.option-btn:active,
.option-btn.touching {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.7), rgba(0, 204, 106, 0.7));
    color: #000;
    border-color: rgba(0, 255, 136, 0.6);
}

/* Immediate tap feedback */
.option-btn.tap-feedback {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.9), rgba(0, 204, 106, 0.9)) !important;
    transform: scale(0.95) translateY(2px) !important;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 255, 136, 0.8) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Add a ripple effect */
.option-btn {
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.option-btn.tap-feedback::before {
    width: 200px;
    height: 200px;
    animation: ripple 0.3s ease-out;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Ensure text stays above ripple */
.option-btn > * {
    position: relative;
    z-index: 1;
}

.change-question-btn.tap-feedback {
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.9), rgba(255, 143, 0, 0.9)) !important;
    transform: scale(0.95) translateY(2px) !important;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(255, 179, 0, 0.8) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Add ripple effect to change question button too */
.change-question-btn {
    position: relative;
    overflow: hidden;
}

.change-question-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.change-question-btn.tap-feedback::before {
    width: 200px;
    height: 200px;
    animation: ripple-orange 0.3s ease-out;
}

@keyframes ripple-orange {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Ensure text stays above ripple */
.change-question-btn > * {
    position: relative;
    z-index: 1;
}
/* Ensure buttons reset properly */
.option-btn:focus,
.option-btn:focus-visible {
    outline: none;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5), rgba(233, 236, 239, 0.5)) !important;
    color: #2c3e50 !important;
    border-color: rgba(222, 226, 230, 0.5) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Force reset styles */
.option-btn[style] {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5), rgba(233, 236, 239, 0.5)) !important;
    color: #2c3e50 !important;
    border-color: rgba(222, 226, 230, 0.5) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.change-question-btn {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 179, 0, 0.5));
    color: #000;
    border: 2px solid rgba(255, 193, 7, 0.5);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    direction: rtl;
    backdrop-filter: blur(10px);
}

.change-question-btn:hover {
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.7), rgba(255, 143, 0, 0.7));
    border-color: rgba(255, 179, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.change-question-btn:focus,
.change-question-btn:focus-visible {
    outline: none;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 179, 0, 0.5)) !important;
    color: #000 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.change-question-btn:active,
.change-question-btn.touching {
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.7), rgba(255, 143, 0, 0.7));
    border-color: rgba(255, 179, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

/* Force reset for change question button */
.change-question-btn[style] {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 179, 0, 0.5)) !important;
    color: #000 !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.start-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.6), rgba(0, 204, 106, 0.6));
    color: #000;
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 16px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(10px);
    font-family: inherit;
    text-align: center;
    direction: rtl;
    min-width: 200px;
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.8), rgba(0, 204, 106, 0.8));
    border-color: rgba(0, 255, 136, 0.6);
}

.start-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.start-btn:focus {
    outline: none;
}

.submit-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.5), rgba(0, 204, 106, 0.5));
    color: #000;
    border: none;
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    min-width: 70px;
    backdrop-filter: blur(10px);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-btn:focus {
    outline: none;
}

.bottom-controls {
    margin-top: 20px;
    text-align: center;
}

.restart-btn {
    background: rgba(255, 255, 255, 0.5);
    color: #2c3e50;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
}

.restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 255, 136, 0.6);
}

.restart-btn:focus {
    outline: none;
}

.share-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.6), rgba(0, 204, 106, 0.6));
    color: #000;
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 20px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
    backdrop-filter: blur(15px);
    margin-top: 15px;
    font-family: inherit;
    direction: rtl;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.8), rgba(0, 204, 106, 0.8));
    border-color: rgba(0, 255, 136, 0.6);
}

.share-btn:focus {
    outline: none;
}

.share-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Ensure all buttons are visible and properly spaced */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

/* Make sure all 6 option buttons are always visible */
.option-btn {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Prevent button text from being cut off */
.option-btn,
.change-question-btn {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

/* Mobile-specific fixes */
@media (max-width: 480px) {
    /* Completely disable hover states on mobile */
    .option-btn:hover {
        background: linear-gradient(135deg, rgba(248, 249, 250, 0.5), rgba(233, 236, 239, 0.5)) !important;
        color: #2c3e50 !important;
        border-color: rgba(222, 226, 230, 0.5) !important;
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .change-question-btn:hover {
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 179, 0, 0.5)) !important;
        color: #000 !important;
        border-color: rgba(255, 193, 7, 0.5) !important;
        transform: none !important;
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
    }
    
    .option-btn {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        /* Force reset styles on mobile */
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .change-question-btn {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .options-grid {
        gap: 18px;
        margin-bottom: 25px;
    }
}

.question {
    color: #e67e22;
    margin: 25px 0 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 243, 205, 0.5), rgba(255, 234, 167, 0.5));
    border-radius: 16px;
    border-left: 4px solid #e67e22;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.1);
    font-weight: 500;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: pre-wrap;
    backdrop-filter: blur(10px);
    text-align: right;
    direction: rtl;
}

.question-header {
    color: #3498db;
    font-weight: 600;
    font-size: 18px;
    margin: 20px 0 25px 0;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-bottom: 10px;
    text-align: right;
    direction: rtl;
}

.result {
    color: #e91e63;
    font-size: 20px;
    font-weight: 700;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(252, 228, 236, 0.5), rgba(248, 187, 217, 0.5));
    border-radius: 20px;
    border: 2px solid #e91e63;
    text-align: center;
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.2);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    backdrop-filter: blur(10px);
    direction: rtl;
}

.wizard-result {
    color: #9c27b0;
    background: linear-gradient(135deg, rgba(243, 229, 245, 0.5), rgba(225, 190, 231, 0.5));
    border-color: #9c27b0;
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.2);
}

.error {
    color: #e74c3c;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 235, 238, 0.5), rgba(255, 205, 210, 0.5));
    border-radius: 12px;
    border-left: 4px solid #e74c3c;
    font-weight: 500;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    backdrop-filter: blur(10px);
    text-align: right;
    direction: rtl;
}

/* Scrollbar styling */
.output::-webkit-scrollbar {
    width: 6px;
}

.output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.output::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border-radius: 3px;
}

.output::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00cc6a, #00ff88);
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .app-container {
        padding: 15px 10px;
    }
    
    .app-title {
        font-size: 28px;
    }
    
    .app-subtitle {
        font-size: 14px;
    }
    
    .content-card {
        padding: 20px;
        border-radius: 20px;
        min-height: 450px;
    }
    
    .output {
        font-size: 15px;
        line-height: 2.0;
        padding-bottom: 15px;
    }
    
    .options-section {
        margin-top: 30px;
        padding-top: 30px;
    }
    
    .options-grid {
        gap: 18px;
        margin-bottom: 25px;
    }
    
    .option-btn {
        padding: 20px 18px;
        font-size: 15px;
        line-height: 1.6;
        min-height: 70px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: right;
        direction: rtl;
    }
    
    .change-question-btn {
        padding: 18px 18px;
        font-size: 14px;
        line-height: 1.5;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        margin-top: 10px;
        direction: rtl;
    }
    
    .start-btn {
        padding: 16px 32px;
        font-size: 16px;
        min-width: 180px;
    }
    
    .submit-btn {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .restart-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .share-btn {
        padding: 14px 28px;
        font-size: 15px;
        margin-top: 12px;
    }
    
    .question {
        padding: 25px 20px;
        margin: 30px 0 35px 0;
        font-size: 15px;
        line-height: 2.0;
    }
    
    .question-header {
        font-size: 16px;
        line-height: 1.8;
        margin: 25px 0 30px 0;
        padding-bottom: 15px;
    }
    
    .result {
        font-size: 18px;
        padding: 25px 20px;
        margin: 30px 0;
        line-height: 1.8;
    }
    
    .error {
        margin: 25px 0;
        padding: 20px;
        line-height: 1.8;
    }
}

@media (max-width: 360px) {
    .app-container {
        padding: 10px 8px;
    }
    
    .content-card {
        padding: 16px;
        min-height: 400px;
    }
    
    .output {
        font-size: 14px;
        line-height: 2.2;
        padding-bottom: 20px;
    }
    
    .options-section {
        margin-top: 35px;
        padding-top: 35px;
    }
    
    .options-grid {
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .option-btn {
        padding: 22px 16px;
        font-size: 14px;
        line-height: 1.7;
        min-height: 75px;
    }
    
    .change-question-btn {
        padding: 20px 16px;
        font-size: 13px;
        line-height: 1.6;
        min-height: 65px;
        margin-top: 15px;
    }
    
    .start-btn {
        padding: 14px 28px;
        font-size: 15px;
        min-width: 160px;
    }
    
    .submit-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .question {
        padding: 25px 18px;
        margin: 35px 0 40px 0;
        font-size: 14px;
        line-height: 2.2;
    }
    
    .question-header {
        font-size: 15px;
        line-height: 2.0;
        margin: 30px 0 35px 0;
        padding-bottom: 20px;
    }
    
    .result {
        font-size: 16px;
        padding: 25px 18px;
        margin: 35px 0;
        line-height: 2.0;
    }
    
    .error {
        margin: 30px 0;
        padding: 22px 18px;
        line-height: 2.0;
    }
}

/* Landscape mobile optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .app-container {
        padding: 10px;
    }
    
    .app-header {
        margin-bottom: 15px;
        padding: 10px 0;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .content-card {
        min-height: 300px;
    }
    
    .output {
        line-height: 1.6;
    }
    
    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .option-btn {
        padding: 14px 12px;
        font-size: 13px;
        line-height: 1.4;
        min-height: 55px;
    }
    
    .change-question-btn {
        padding: 12px 14px;
        font-size: 12px;
        line-height: 1.4;
        min-height: 45px;
    }
    
    .question {
        padding: 16px;
        margin: 15px 0 20px 0;
        font-size: 13px;
        line-height: 1.6;
    }
    
    .question-header {
        margin: 15px 0 20px 0;
        padding-bottom: 8px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .option-btn {
        padding: 22px 20px;
        font-size: 16px;
        line-height: 1.6;
        min-height: 75px;
    }
    
    .change-question-btn {
        padding: 20px 20px;
        font-size: 15px;
        line-height: 1.5;
        min-height: 65px;
    }
    
    .start-btn {
        padding: 18px 36px;
        font-size: 17px;
        min-width: 190px;
    }
    
    .submit-btn {
        padding: 16px 22px;
        min-width: 80px;
    }
    
    .restart-btn {
        padding: 18px 36px;
        font-size: 16px;
    }
    
    .share-btn {
        padding: 18px 36px;
        font-size: 16px;
        margin-top: 15px;
    }
    
    .question {
        padding: 25px 22px;
        font-size: 16px;
        line-height: 2.0;
        margin: 30px 0 35px 0;
    }
    
    .question-header {
        line-height: 1.8;
        margin: 25px 0 30px 0;
        padding-bottom: 15px;
    }
}

/* Additional text wrapping improvements */
.output * {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Ensure proper text flow in Hebrew */
[dir="rtl"] .output,
[dir="rtl"] .question,
[dir="rtl"] .option-btn,
[dir="rtl"] .change-question-btn {
    text-align: right;
    direction: rtl;
}

/* Better spacing for multi-line questions */
.question br {
    line-height: 2.5;
}

.question p {
    margin-bottom: 1em;
    line-height: inherit;
}

.question p:last-child {
    margin-bottom: 0;
}

/* Improved spacing between text elements */
.output > span {
    display: block;
    margin-bottom: 0.5em;
}

.output > span:last-child {
    margin-bottom: 0;
}

/* Better line spacing for different text types */
.output .question-header + .question {
    margin-top: 10px;
}

/* Ensure adequate spacing between question parts */
.question-header {
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

/* Additional mobile-specific text improvements */
@media (max-width: 480px) {
    .output > span {
        margin-bottom: 0.8em;
    }
    
    .question-header + * {
        margin-top: 15px;
    }
    
    .question + * {
        margin-top: 20px;
    }
}

@media (max-width: 360px) {
    .output > span {
        margin-bottom: 1em;
    }
    
    .question-header + * {
        margin-top: 20px;
    }
    
    .question + * {
        margin-top: 25px;
    }
}