/* Create Mystery Mobile Fixes - Targeted fixes for specific mobile issues */

@media (max-width: 768px) {
    
    /* ===============================================
       1. SUSPECT CARDS MOBILE LAYOUT FIXES
       =============================================== */
    
    .suspects-container {
        padding: 1rem !important;
        margin-top: 1rem !important;
    }
    
    .suspect-card {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 10px !important;
    }
    
    .suspect-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .suspect-number {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .suspect-controls {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 1rem !important;
    }
    
    .guilty-checkbox {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        color: #8b4513 !important;
        font-family: 'FBRemington', serif !important;
        font-weight: bold !important;
        font-size: 1rem !important;
    }
    
    .guilty-checkbox input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .remove-suspect {
        background: #dc3545 !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        padding: 0.5rem 1rem !important;
        cursor: pointer !important;
        font-size: 0.9rem !important;
        transition: all 0.3s ease !important;
        white-space: nowrap !important;
    }
    
    .suspect-fields {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    .suspect-fields .form-group {
        margin-bottom: 0 !important;
    }
    
    .suspect-fields .form-group label {
        margin-bottom: 0.75rem !important;
        font-size: 1.05rem !important;
    }
    
    .suspect-fields .form-group input,
    .suspect-fields .form-group textarea {
        padding: 1rem !important;
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .motive-field {
        grid-column: 1 !important;
        margin-top: 0.5rem !important;
    }
    
    .motive-field label {
        color: #d4af37 !important;
        font-weight: bold !important;
        font-size: 1.05rem !important;
    }
    
    .motive-field input {
        border: 2px solid #d4af37 !important;
        background: #fff8e1 !important;
        padding: 1rem !important;
    }
    
    .add-suspect-btn {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1.1rem !important;
        margin-top: 1.5rem !important;
        border-radius: 10px !important;
    }
    
    /* ===============================================
       2. CREDITS DISPLAY MOBILE FIXES
       =============================================== */
    
    .credits-info {
        background: #fff8e1 !important;
        border: 2px solid #d4af37 !important;
        color: #8b4513 !important;
        font-family: 'FBRemington', serif !important;
        font-weight: bold !important;
        padding: 1.25rem 1.5rem !important;
        margin: 2rem 0 !important;
        text-align: center !important;
        border-radius: 10px !important;
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.75rem !important;
        min-height: 60px !important;
        word-break: break-word !important;
    }
    
    .credits-info i {
        font-size: 1.2rem !important;
        flex-shrink: 0 !important;
    }
    
    .credits-info span {
        flex: 1 !important;
        text-align: center !important;
    }
    
    /* ===============================================
       3. GENERATE BUTTON VISIBILITY FIXES
       =============================================== */
    
    #generateBtn {
        width: 100% !important;
        max-width: none !important;
        margin: 2rem 0 !important;
        font-size: 1.2rem !important;
        padding: 1.25rem 2rem !important;
        border-radius: 10px !important;
    }
    
    /* Add proper bottom spacing to form card */
    .form-card {
        padding: 2rem 1.5rem 3rem 1.5rem !important;
        margin: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* Ensure step content has proper bottom padding */
    .step-content {
        padding: 1rem 0 4rem 0 !important;
        margin-bottom: 2rem !important;
    }
    
    /* Add safe area padding for iOS devices */
    .step-content {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom)) !important;
    }
    
    /* ===============================================
       4. ADDITIONAL FORM SPACING IMPROVEMENTS
       =============================================== */
    
    /* Better spacing for form groups on mobile */
    .form-group {
        margin-bottom: 1.75rem !important;
    }
    
    .form-group label {
        margin-bottom: 0.75rem !important;
        font-size: 1.05rem !important;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 1rem !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
        line-height: 1.4 !important;
    }
    
    .form-group textarea {
        min-height: 140px !important;
        line-height: 1.6 !important;
    }
    
    /* Better spacing for form grid sections */
    .form-grid-full {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Improve spacing between major sections */
    .suspects-section {
        margin-top: 2.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* ===============================================
       5. PROGRESS STEPS MOBILE TOUCH-UPS
       =============================================== */
    
    .progress-container {
        margin: 2rem auto !important;
        padding: 0 1rem !important;
    }
    
    .step-title {
        font-size: 0.9rem !important;
        margin-top: 0.5rem !important;
        text-align: center !important;
    }
    
    .step-number {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
        line-height: 45px !important;
        text-align: center !important;
    }
    
    /* ===============================================
       6. BETTER TOUCH TARGETS FOR MOBILE
       =============================================== */
    
    .back-btn {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 48px !important;
        border-radius: 8px !important;
    }
    
    /* Ensure all buttons have proper touch targets */
    .btn {
        min-height: 48px !important;
        padding: 1rem 1.5rem !important;
        border-radius: 8px !important;
    }
    
    /* ===============================================
       7. MODAL MOBILE IMPROVEMENTS
       =============================================== */
    
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 1rem !important;
        border-radius: 12px !important;
    }
    
    .modal-body {
        padding: 1.5rem !important;
    }
    
    .modal-body textarea {
        min-height: 250px !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
        padding: 1rem !important;
    }
    
    /* ===============================================
       8. LOADING OVERLAY MOBILE FIX
       =============================================== */
    
    .loading-content {
        width: 90% !important;
        max-width: 350px !important;
        padding: 2.5rem 2rem !important;
        margin: 1rem !important;
    }
    
    .loading-content p {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
}